Pre-requisite :
- Python3
- Pip
pip3 install pyyaml
test.yaml
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "github.com/hashicorp/nomad/api" | |
| "github.com/sirupsen/logrus" | |
| ) |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "time" | |
| "github.com/hashicorp/nomad/api" | |
| "github.com/sirupsen/logrus" | |
| ) |
Pre-requisite :
pip3 install pyyaml
test.yaml
| #!/bin/bash | |
| init() { | |
| PROJECT_ID= | |
| GITLAB_PRIVATE_TOKEN= | |
| } | |
| restore_project_variables() { | |
| while read project_var_key <&3 && \ | |
| read project_var_value <&4 && \ |
| #!/bin/bash | |
| init() { | |
| PROJECT_ID= | |
| GITLAB_PRIVATE_TOKEN= | |
| touch ./backup_envar_${PROJECT_ID}.conf | |
| touch ./backup_envar_${PROJECT_ID}.json | |
| } | |
| backup_and_delete_project_variables() { |
| #!/bin/bash | |
| init() { | |
| SOURCE_PROJECT_ID= | |
| TARGET_PROJECT_ID= | |
| GITLAB_PRIVATE_TOKEN= | |
| } | |
| import_project_variables() { | |
| while read project_var_key <&3 && \ |
| #!/bin/bash | |
| init() { | |
| SOURCE_GROUP_ID= | |
| TARGET_GROUP_ID= | |
| GITLAB_PRIVATE_TOKEN= | |
| } | |
| import_group_variables() { | |
| while read group_var_key <&3 && \ |
| #!/bin/bash | |
| function install_helm() { | |
| echo "Install helm3 latest version" | |
| curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | |
| chmod +x get_helm.sh | |
| ./get_helm.sh | |
| } | |
| function main () { |
| #!/bin/bash | |
| function patch_apt() { | |
| echo "Patching System Auto Update and Auto Upgrade..." | |
| sed -i 's/1/0/g' /etc/apt/apt.conf.d/10periodic | |
| sed -i 's/1/0/g' /etc/apt/apt.conf.d/20auto-upgrades | |
| apt-get clean | |
| echo "Auto Update and Auto Upgrade Disabled!!!" | |
| } |
| #!/bin/bash | |
| function install_doctl() { | |
| echo "Install doctl" | |
| curl -L $(curl -s https://api.github.com/repos/digitalocean/doctl/releases/latest \ | |
| | grep browser_download_url \ | |
| | grep linux-amd64 \ | |
| | cut -d '"' -f 4) \ | |
| | tar xvz |