Skip to content

Commit

Permalink
chore: add initial tackle demo
Browse files Browse the repository at this point in the history
  • Loading branch information
robcxyz committed Feb 23, 2022
1 parent 6e4f512 commit 445a40e
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

.terraform.lock.hcl

deployments/*

# Terraform and terragrunt
*.tfstate*
*.tfstate.backup
Expand Down
4 changes: 4 additions & 0 deletions releases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
polkadot:
- polkadot_client_url: "https://github.com/paritytech/polkadot/releases/download/v0.9.12/polkadot"
polkadot_client_hash: "4a06a043e8fec42e09384a7ebab4331d138101ee55846af356e08d38982d767a"

66 changes: 66 additions & 0 deletions tackle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# CLI that generates a module for deployment
action:
->: select
choices:
- Create a new deployment: deploy
- Upgrade an existing deployment: upgrade

deploy->:
if: action == 'deploy'

intro_>: |
confirm You will now be prompted for options to setup a new node. If you make a mistake,
you can either start over or edit the produced files directly.
deployment_name->: input "What do you want to call your deployment?" --default my-deployment
output_path_>: input "Where do you want to generate the deployment?" --default "./deployments/{{deployment_name}}"

# Check to replace
check_output_path->: isdir "{{output_path}}"
replace_>:
if: check_output_path
check->: confirm "The output path {{output_path}} exists. Do you want to replace it?"
print->: print Exiting --if "not check"
exit:
->: exit 0
if: not check

public_key_path->: input "Enter the path to a public ssh key" --default "~/.ssh/id_rsa.pub"
public_key_exists->: isfile "{{public_key_path}}"
public_key:
->: file "{{public_key_path}}"
if: public_key_exists
else: Could not find key in {{public_key_path}} - Fix this manually.

node_purpose:
->: select
choices:
- Validator node: validator
- API node: api

chain:
->: select
choices:
- polkadot
- kusama

releases_>: yaml releases.yaml
current release:
->: var {{releases[chain][0]}}
merge: true
module_version: v0.1.0

validator_options->:
if: node_purpose == 'validator'
merge: true
consul_enabled: false
hardening_enabled: true
mount_volumes: false
skip_health_check: true

# d->: debug
generate->: generate templates/ "{{output_path}}/"

upgrade->:
if: action == 'upgrade'
warning->: print Not implemented yet... This is just a demo.

0 comments on commit 445a40e

Please sign in to comment.