Add playbook variable to control force rebuild
This commit is contained in:
parent
0e68b002bd
commit
f27b1eb619
@ -6,6 +6,11 @@
|
||||
- [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install)
|
||||
- LPS distribution Google spreadsheet URL or CSV file path
|
||||
- Install `zstd` using `sudo apt install zstd`
|
||||
- laconicd-stack
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
|
||||
```
|
||||
|
||||
## Setup node
|
||||
|
||||
@ -57,12 +62,6 @@
|
||||
|
||||
- Run the following steps in the machine where genesis file is to be generated
|
||||
|
||||
- Fetch Stack:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
|
||||
```
|
||||
|
||||
- Run playbook to build laconicd container:
|
||||
|
||||
```bash
|
||||
@ -87,12 +86,6 @@
|
||||
laconic-so deployment --dir <testnet-deployment-dir> stop
|
||||
```
|
||||
|
||||
- Fetch the stack in machine where the testnet chain node is running:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
|
||||
```
|
||||
|
||||
- Run script to export state from testnet chain:
|
||||
|
||||
```bash
|
||||
@ -105,12 +98,6 @@
|
||||
|
||||
- Run the following steps in secure machine separate from the one where the node is setup
|
||||
|
||||
- Fetch the stack:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
|
||||
```
|
||||
|
||||
- Copy over compressed `testnet-state.zst` file to target machine
|
||||
|
||||
- Set envs:
|
||||
|
||||
@ -4,6 +4,11 @@
|
||||
|
||||
- [ansible](playbooks/README.md#ansible-installation)
|
||||
- [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install)
|
||||
- laconicd-stack
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
|
||||
```
|
||||
|
||||
## Setup Node
|
||||
|
||||
@ -23,12 +28,6 @@
|
||||
laconic-so deployment --dir <testnet-deployment-dir> stop
|
||||
```
|
||||
|
||||
- Fetch the stack:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
|
||||
```
|
||||
|
||||
This command clones the entire repository into the `~/cerc` folder, which includes the genesis file published by the first validator.
|
||||
|
||||
- Copy the example variables file:
|
||||
@ -141,12 +140,6 @@
|
||||
|
||||
- Run the following steps in the machine from where the create-validator transaction is to be signed
|
||||
|
||||
- Fetch Stack:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
|
||||
```
|
||||
|
||||
- Run playbook to build laconicd container:
|
||||
|
||||
```bash
|
||||
@ -179,12 +172,6 @@
|
||||
|
||||
- Run these steps in a secure machine separate from the one where the node is setup
|
||||
|
||||
- Fetch the stack:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
|
||||
```
|
||||
|
||||
This command clones the entire repository into the `~/cerc` folder, which includes the genesis file published by the first validator.
|
||||
|
||||
- Copy the example variables file:
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
mainnet_deployment_dir: "{{ lookup('env', 'MAINNET_DEPLOYMENT_DIR') }}"
|
||||
spec_file: "{{data_directory}}/laconicd-spec.yml"
|
||||
spec_template: "./templates/specs/spec-template.yml.j2"
|
||||
build_args: "{{ '--force-rebuild' if (lookup('env', 'FORCE_REBUILD') | default(omit, true)) not in [ 'false', 'False', '0' ] else '' }}"
|
||||
tasks:
|
||||
- name: Fail if DATA_DIRECTORY or MAINNET_DEPLOYMENT_DIR env vars are not set
|
||||
fail:
|
||||
@ -16,9 +17,6 @@
|
||||
Please export both DATA_DIRECTORY and MAINNET_DEPLOYMENT_DIR before running the playbook.
|
||||
when: lookup('env', 'DATA_DIRECTORY') == '' or lookup('env', 'MAINNET_DEPLOYMENT_DIR') == ''
|
||||
|
||||
- name: Fetch laconicd stack
|
||||
shell: laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
|
||||
|
||||
- name: Setup required repositories
|
||||
shell: >
|
||||
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd
|
||||
@ -26,7 +24,7 @@
|
||||
|
||||
- name: Build container images
|
||||
shell: |
|
||||
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd build-containers --force-rebuild
|
||||
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd build-containers {{ build_args }}
|
||||
|
||||
- name: Create deployment spec file
|
||||
shell: |
|
||||
|
||||
@ -2,12 +2,14 @@
|
||||
- name: Build Laconicd
|
||||
hosts: localhost
|
||||
connection: local
|
||||
vars:
|
||||
build_args: "{{ '--force-rebuild' if (lookup('env', 'FORCE_REBUILD') | default(omit, true)) not in [ 'false', 'False', '0' ] else '' }}"
|
||||
tasks:
|
||||
- name: Fetch repositories
|
||||
ansible.builtin.shell:
|
||||
cmd: "laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd setup-repositories --git-ssh --pull"
|
||||
- name: Setup required repositories
|
||||
shell: >
|
||||
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd
|
||||
setup-repositories --git-ssh --pull
|
||||
|
||||
# TODO: Add a flag to control force rebuild
|
||||
- name: Build containers
|
||||
ansible.builtin.shell:
|
||||
cmd: "laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd build-containers --force-rebuild"
|
||||
- name: Build container images
|
||||
shell: |
|
||||
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd build-containers {{ build_args }}
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
mainnet_deployment_dir: "{{ lookup('env', 'MAINNET_DEPLOYMENT_DIR') }}"
|
||||
spec_file: "{{data_directory}}/laconicd-validator-spec.yml"
|
||||
spec_template: "./templates/specs/spec-template.yml.j2"
|
||||
build_args: "{{ '--force-rebuild' if (lookup('env', 'FORCE_REBUILD') | default(omit, true)) not in [ 'false', 'False', '0' ] else '' }}"
|
||||
tasks:
|
||||
- name: Fail if DATA_DIRECTORY or MAINNET_DEPLOYMENT_DIR env vars are not set
|
||||
fail:
|
||||
@ -23,9 +24,6 @@
|
||||
Please set genesis_file and staking_amount_file in validator-vars.yml.
|
||||
when: not genesis_file or not staking_amount_file
|
||||
|
||||
- name: Fetch laconicd stack
|
||||
shell: laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
|
||||
|
||||
- name: Setup required repositories
|
||||
shell: >
|
||||
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd
|
||||
@ -33,7 +31,7 @@
|
||||
|
||||
- name: Build container images
|
||||
shell: |
|
||||
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd build-containers --force-rebuild
|
||||
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd build-containers {{ build_args }}
|
||||
|
||||
- name: Create deployment spec file
|
||||
shell: |
|
||||
|
||||
Loading…
Reference in New Issue
Block a user