feat: configure kubectl through ansible (#948)

Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
This commit is contained in:
Anish Lakhwara 2023-07-07 09:15:18 -07:00 committed by GitHub
parent dd3d9001fb
commit c5803dcda0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -26,6 +26,7 @@ bucket_path: "crawls"
domain: "browsertrix.cloud"
subdomain: "{{ project_name }}"
configure_kube: false
use_do_registry: true
image_tag: "latest"

View File

@ -219,6 +219,10 @@
registry_endpoint: "{{ do_registry_result.stdout_lines[1] }}"
when: use_do_registry
- name: d_ocean | registry | configure kubectl
ansible.builtin.shell: doctl k8s cluster kubeconfig save {{ my_cluster.data.id }}
when: configure_kubectl
- name: d_ocean | registry | add to new k8s cluster
ansible.builtin.shell: set -o pipefail && doctl registry kubernetes-manifest | kubectl apply -f -
when: use_do_registry

View File

@ -23,7 +23,7 @@ git clone https://github.com/webrecorder/browsertrix-cloud.git
cd browsertrix-cloud
```
2. [Look at the configuration options](https://github.com/webrecorder/browsertrix-cloud/blob/main/ansible/group_vars/do/main.yml) and modify them or pass them as extra variables as shown below.
2. [Look at the configuration options](https://github.com/webrecorder/browsertrix-cloud/blob/main/ansible/group_vars/do/main.yml) and modify them or pass them as extra variables as shown below. If you haven't configured `kubectl`, please enable the `configure_kube` option
3. Run the playbook:
```zsh