I hereby claim:
- I am raykao on github.
- I am raykao (https://keybase.io/raykao) on keybase.
- I have a public key ASB1OgQWgG4JUJOHAv70PW8fEe3X6JWJkrpd1146kA4TpAo
To claim this, I am signing this object:
## The Env Vars | |
# AZURE_SUBSCRIPTION_ID | |
# CONSUL_VMSS_RG | |
# CONSUL_VMSS_NAME | |
## were prepended to this script at provisioning time with Terraform via custom_data/cloud-init | |
AZURE_MSI_ENDPOINT="http://169.254.169.254/metadata/identity" | |
AZURE_MSI_OAUTH=$(curl -H "Metadata:true" $AZURE_MSI_ENDPOINT"/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fmanagement.azure.com%2F") | |
AZURE_MSI_JWT=$(echo $AZURE_MSI_OAUTH | jq -r '.access_token') |
I hereby claim:
To claim this, I am signing this object:
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: bobble | |
labels: | |
name: bobble | |
spec: | |
type: LoadBalancer | |
ports: | |
- name: http |
#!/bin/bash | |
# This script is only tested on CentOS 6.5 | |
# You can customize variables such as MOUNTPOINT, RAIDCHUNKSIZE and so on to your needs. | |
# You can also customize it to work with other Linux flavours and versions. | |
# If you customize it, copy it to either Azure blob storage or Github so that Azure | |
# custom script Linux VM extension can access it, and specify its location in the | |
# parameters of powershell script or runbook or Azure Resource Manager CRP template. | |
NODENAME=$(hostname) |
{ | |
"$schema": "https://schema.management.azure.com/schemas/2016-09-01/deploymentTemplate.json", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"deploymentPrefix": { | |
"type": "string" | |
}, | |
"indexCount": { | |
"type": "int" | |
}, |
{ | |
"$schema": "http://schema.management.azure.com/schemas/2016-09-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"deploymentPrefix": { | |
"type": "string", | |
"metadata": { | |
"description": "Deployment Prefix name. Added to the beginning of each resource." | |
} | |
}, |
#!/usr/bin/env bash | |
sudo -i | |
cd /etc/mysql/conf.d | |
wget https://gist.githubusercontent.com/raykao/027e42847392a0eafb6c7b51c3291191/raw/a328e20eb13e2e129101dea460e1bd592d7f1c3b/galera.cnf | |
sed -i "s/first_ip/$(ip -4 addr ls eth0 | awk '/inet / {print $2}' | cut -d"/" -f1)/g" galera.cnf |
# /etc/mysql/conf.d/galera.cnf | |
[mysqld] | |
binlog_format=ROW | |
default-storage-engine=innodb | |
innodb_autoinc_lock_mode=2 | |
bind-address=0.0.0.0 | |
# Galera Provider Configuration | |
wsrep_on=ON |
#!/usr/bin/env bash | |
export DEBIAN_FRONTEND="noninteractive" | |
export PASSWORD="H3ll0W0rld!" | |
sudo debconf-set-selections <<< "mariadb-server mysql-server/root_password password $PASSWORD" | |
sudo debconf-set-selections <<< "mariadb-server mysql-server/root_password_again password $PASSWORD" | |
sudo apt-get install software-properties-common | |
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 |
server { | |
listen 80; | |
server_name yourdomain.com; | |
root /home/yourUserAccount/yourdomain.com/dist; | |
index index.html; | |
location / { | |
try_files $uri $uri/ /index.html; | |
} |