Skip to content

Instantly share code, notes, and snippets.

View ams0's full-sized avatar
🏠
Working from home

Alessandro Vozza ams0

🏠
Working from home
View GitHub Profile
#Azure point to site on a Mac
#create RG
az group create -n vpnet
#create network and subnet
az network vnet create -g vpnet -n VNet1 --address-prefixes 192.168.0.0/16 --subnet-name FrontEnd --subnet-prefix 192.168.1.0/24
az network vnet subnet create -n GatewaySubnet --address-prefix 192.168.200.0/24 --vnet-name VNet1 -g vpnet
#create a public ip
{
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
"orchestratorRelease": "1.8",
"kubernetesConfig": {
"networkPolicy": "calico",
"clusterSubnet": "172.16.38.0/23"
}
@ams0
ams0 / Dockerfile
Created September 30, 2017 22:04
multistage acs-engine-light
FROM golang
ENV GOPATH /gopath
ENV PATH "${PATH}:${GOPATH}/bin"
# change Azure to another source if you need
RUN go get -d -v github.com/Azure/acs-engine ; exit 0 # Workaround for issues #1068
WORKDIR /gopath/src/github.com/Azure/acs-engine
#RUN git checkout <branch> if you need to work with a branch
@ams0
ams0 / brewme.sh
Last active September 27, 2017 09:36
#!/bin/bash
#brews
brew install wget
brew install mc
brew install tmux
brew install go
brew install node
brew install bash-completion
brew install m-cli
apiVersion: v1
kind: Pod
metadata:
name: ingress-pod
labels:
k8s-app: ingress-service
namespace: kube-system
spec:
containers:
- name: nginx
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes 10.0.0.1 <none> 443/TCP 2d
my-nginx 10.0.41.13 52.232.76.168 80:30848/TCP 1h
apiVersion: v1
kind: Service
metadata:
name: my-nginx
labels:
name: my-nginx
spec:
ports:
- port: 80
targetPort: 80
kube_new_version: "v1.7.0"
kube_old_version: "v1.6.6"
max_pods: "900"
[all:vars]
ansible_ssh_common_args=' -o ProxyCommand="ssh -i ~/.ssh/acs -W %h:%p [email protected]"'
ansible_ssh_user=azureuser
become=yes
host_key_checking = False
[nodes]
k8s-agentpool1-14608970-0
k8s-agentpool1-14608970-1
k8s-agentpool1-14608970-2
"servicePrincipalClientId": {
"reference": {
"keyVault": {
"id": "/subscriptions/12c7e9d6-967e-40c8-8b3e-4659a4ada3ef/resourceGroups/keyvault/providers/Microsoft.KeyVault/vaults/acsvault"
},
"secretName": "acsspid"
}
},
"servicePrincipalClientSecret": {
"reference": {