diff --git a/kubernetes/tasks/k8s-dqlite_deploy.yml b/kubernetes/tasks/k8s-dqlite_deploy.yml deleted file mode 100644 index b11658e..0000000 --- a/kubernetes/tasks/k8s-dqlite_deploy.yml +++ /dev/null @@ -1,21 +0,0 @@ -- name: Add Dqlite/dev Repository - ansible.builtin.apt_repository: - repo: ppa:dqlite/dev - codename: bionic - -- name: Install dependencies - package: - name: - #- musl-dev - - libraft-dev - - libsqlite3-dev - - libdqlite-dev - - dqlite - state: latest - -- name: Deploy binary - ansible.builtin.copy: - src: k8s-dqlite/k8s-dqlite - dest: /usr/local/bin/ - mode: u=rwx,g=rx,o=rx - diff --git a/kubernetes/tasks/k8s-dqlite_setup.yml b/kubernetes/tasks/k8s-dqlite_setup.yml deleted file mode 100644 index 5533f20..0000000 --- a/kubernetes/tasks/k8s-dqlite_setup.yml +++ /dev/null @@ -1,40 +0,0 @@ -- name: Create folder for data - ansible.builtin.file: - path: /var/data/ - state: directory - mode: '0755' - -- name: Deploy init.yaml from template - ansible.builtin.template: - src: k8s-dqlite/init.yaml.template - dest: /var/data/init.yaml - -- name: Deploy cert-config-file from template - when: "inventory_hostname == groups['kubernetes'][0]" - ansible.builtin.template: - src: k8s-dqlite/csr-dqlite.conf.template - dest: /var/tmp/csr-dqlite.conf - -- name: dqlite Generate certificate - when: "inventory_hostname == groups['kubernetes'][0]" - command: openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes -keyout /var/data/cluster.key -out /var/data/cluster.crt -subj "/CN=k8s" -config /var/tmp/csr-dqlite.conf -extensions v3_ext - -- name: Fetch cluster.crt and cluster.key - when: "inventory_hostname == groups['kubernetes'][0]" - synchronize: - src: "{{ item }}" - dest: /tmp/ - mode: pull - with_items: - - /var/data/cluster.crt - - /var/data/cluster.key - -- name: Copy cluster.crt and cluster.key to joining nodes - when: "inventory_hostname != groups['kubernetes'][0]" - ansible.builtin.copy: - src: "{{ item }}" - dest: /var/data/ - mode: u=rw,g=r,o=r - with_items: - - /tmp/cluster.crt - - /tmp/cluster.key diff --git a/kubernetes/templates/k8s-dqlite/csr-dqlite.conf.template b/kubernetes/templates/k8s-dqlite/csr-dqlite.conf.template deleted file mode 100644 index e2d5f9d..0000000 --- a/kubernetes/templates/k8s-dqlite/csr-dqlite.conf.template +++ /dev/null @@ -1,28 +0,0 @@ -[ req ] -default_bits = 2048 -prompt = no -default_md = sha256 -req_extensions = req_ext -distinguished_name = dn - -[ dn ] -C = GB -ST = Canonical -L = Canonical -O = Canonical -OU = Canonical -CN = k8s - -[ req_ext ] -subjectAltName = @alt_names - -[ alt_names ] -DNS = {{ ansible_facts.fqdn }} -IP = {{ ansible_facts.default_ipv6.address }} - -[ v3_ext ] -authorityKeyIdentifier=keyid,issuer:always -basicConstraints=CA:FALSE -keyUsage=keyEncipherment,dataEncipherment,digitalSignature -extendedKeyUsage=serverAuth,clientAuth -subjectAltName=@alt_names