nomad agent -dev -bind 0.0.0.0 -acl-enabled >nomad-server.log & | |
sleep 5 | |
nomad acl bootstrap -json > bootstrap.json | |
export NOMAD_TOKEN=$(jq -r .SecretID bootstrap.json) | |
# creating a namespace and quota | |
nomad namespace apply -description "QA instances of webservers" web-qa | |
nomad quota init | |
nomad quota apply spec.hcl |
Not all Terraform providers are built for arm64
.
One solution here is to install Terraform as amd64
which can be easily done from the downloads page.
However, for those who are using and switching between versions of Terraform often, a more streamlined approach is desirable.
Enter asdf
.
#!/usr/bin/env bash | |
set -e | |
readonly CONTENT_MAIN_TF='module "wrapper" {}' | |
readonly CONTENT_VARIABLES_TF='variable "items" { | |
description = "Maps of items to create a wrapper from. Values are passed through to the module." | |
type = any | |
default = {} | |
}' |
{ | |
// // settings for all languages | |
"editor.fontFamily": "'Cascadia Code PL', 'Cascadia Code', Consolas, monaco, monospace", | |
"editor.fontSize": 18, | |
"editor.minimap.enabled": false, | |
// "editor.suggest.showStatusBar": true, | |
// "editor.suggest.insertMode": "insert", | |
// "workbench.tree.indent": 16 |
---------------------------------------------------------------------------------------------------------------------- | |
# Not inventory, remote passwordless ssh connection | |
[clients] | |
control01 ansible_host=192.168.45.10 ansible_connection=ssh ansible_ssh_port=22 ansible_ssh_private_key_file=/home/vagrant/.ssh/id_rsa ansible_user=vagrant | |
#vagrant-client01 ansible_host=10.10.40.94 ansible_ssh_private_key_file='.vagrant/machines/vagrant-client01/virtualbox/private_key' ansible_connection=local ansible_ssh_user='vagrant' | |
[all:vars] | |
ansible_python_interpreter=/usr/bin/python3 | |
---------------------------------------------------------------------------------------------------------------------- | |
# Running a playbook in dry-run mode |
import os | |
import sys | |
import json | |
import requests | |
def create_team(hostname, org, name, **kwargs): | |
""" | |
POST /organizations/:organization_name/teams | |
""" | |
if kwargs.get('tfe_token'): |
Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.
If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.
#!/bin/bash | |
# export LICENSE_ID="" | |
# export PASSWORD="" | |
[[ -z "$LICENSE_ID" ]] && echo "Please Set LICENSE_ID Environment Variable" && exit 1 | |
[[ -z "$PASSWORD" ]] && echo "Please Set PASSWORD Environment Variable" && exit 1 | |
b64_password=$(echo -n ${PASSWORD} | base64) |
go mod edit -module {NEW_MODULE_NAME} | |
-- rename all imported module | |
find . -type f -name '*.go' \ | |
-exec sed -i -e 's,{OLD_MODULE},{NEW_MODULE},g' {} \; |