git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
# this is a bag of functions sourced by another script | |
if [[ $BASH_VERSINFO -lt "4" ]]; then | |
echo "!! Your system Bash is out of date: $BASH_VERSION" | |
echo "!! Please upgrade to Bash 4 or greater." | |
exit 2 | |
fi | |
if [[ $EUID -ne 0 ]]; then | |
echo "!! This script must be run as root" |
#!/bin/bash | |
# | |
# Installation of Hashicorp Nomad for deploy process | |
# | |
# Download this file: | |
# curl -sSL https://gist.githubusercontent.com/ryanpadilha/351a4a4f17afdc8eb0d963897b98122a/raw/ -o nomad-install.sh | |
# | |
echo "Initializing script for devops - Nomad Hashicorp" |
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem | |
chmod 700 id_rsa.pem |
(wherever it says url.com, use your server's domain or IP)
Login to new server as root, then add a deploy user
sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deploy
And Update the new password
image: node:7.7.0 | |
cache: | |
key: "$CI_PROJECT_ID" | |
paths: | |
- node_modules/ | |
before_script: | |
- npm set progress=false |
import Gun from 'gun/gun' | |
localStorage.clear() | |
const guid = () => [2,1,1,1,3].map(n => Array.from(Array(n), () => Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1)).join('')).join('-') | |
const gun = new Gun | |
const notes = gun.get('notes') | |
notes.map().on((id, name) => console.log('ls', id, name)) |