Prathamesh Musale
2e0fbd82f1
Part of [Service Provider setup](https://www.notion.so/Service-provider-setup-a09e2207e1f34f3a847f7ce9713b7ac5) and [Service provider auctions for web deployments](https://www.notion.so/Service-provider-auctions-for-web-deployments-104a6b22d47280dbad51d28aa3a91d75) - Configure laconicd chain id - Configure whether deployer should handle auctions and amount to bid - Update playbook to issue wildcard cert on deploying k8s Co-authored-by: Adw8 <adwaitgharpure@gmail.com> Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> Reviewed-on: #12 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
- name: Setup go-nitro on host
|
|
hosts: "{{ target_host }}"
|
|
|
|
vars_files:
|
|
- setup-vars.yml
|
|
- bridge-vars.yml
|
|
|
|
environment:
|
|
PATH: "{{ ansible_env.PATH }}:/home/{{ansible_user}}/bin"
|
|
|
|
tasks:
|
|
- name: Create directory for nitro bridge deployment
|
|
file:
|
|
path: "{{ nitro_directory }}"
|
|
state: directory
|
|
|
|
- name: Change owner of nitro-directory
|
|
file:
|
|
path: "{{ nitro_directory }}"
|
|
owner: "{{ansible_user}}"
|
|
group: "{{ansible_user}}"
|
|
state: directory
|
|
recurse: yes
|
|
|
|
- name: Clone go-nitro stack repo
|
|
expect:
|
|
command: laconic-so fetch-stack git.vdb.to/cerc-io/nitro-stack --git-ssh --pull
|
|
responses:
|
|
"Are you sure you want to continue connecting \\(yes/no/\\[fingerprint\\]\\)\\?": "yes"
|
|
timeout: 300
|
|
ignore_errors: yes
|
|
|
|
- name: Build containers
|
|
command: laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/bridge build-containers --force-rebuild
|
|
when: not skip_container_build
|
|
|
|
- name: Check if deployment exists for bridge node
|
|
stat:
|
|
path: "{{ nitro_directory }}/bridge-deployment"
|
|
register: bridge_deployment
|
|
|
|
- name: Generate spec file for bridge deployment
|
|
template:
|
|
src: "./templates/specs/bridge-nitro-spec.yml.j2"
|
|
dest: "{{ nitro_directory }}/bridge-nitro-spec.yml"
|
|
when: not bridge_deployment.stat.exists
|
|
|
|
- name: Create a deployment for the bridge node
|
|
command: laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/bridge deploy create --spec-file bridge-nitro-spec.yml --deployment-dir bridge-deployment
|
|
args:
|
|
chdir: "{{ nitro_directory }}"
|
|
when: not bridge_deployment.stat.exists
|
|
|
|
- name: Start the nitro bridge
|
|
command: laconic-so deployment --dir bridge-deployment start
|
|
args:
|
|
chdir: "{{ nitro_directory }}"
|