This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -k \ | |
| --header "Content-Type:application/merge-patch+json" \ | |
| --header "Accept: application/json" \ | |
| --header "Authorization: Bearer $TOKEN" \ | |
| --request PATCH \ | |
| --data '{ "metadata": {"labels": {"base": "coreOS"}}}' \ | |
| $API_SERVER/api/v1/nodes/172.17.4.202 |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| export vault=/usr/local/bin/vault | |
| export VAULT_TOKEN=$(cat /root/.vault-token) | |
| vault_cacert='-ca-cert=/path/to/your/ca.pem' | |
| local_vault="-address=https://$(hostname -f):8200" | |
| unsealed_vault="-address=https://$(getent hosts $(dig +short vault.service.consul | tail -n 1) | awk '{ print $2 }'):8200" | |
| leader_vault="-address=https://$($vault status $vault_cacert $unsealed_vault 2> /dev/null | grep Leader | awk '{ print $2 }' | sed 's/^http\(\|s\):\/\///g'):8200" | |
| vault_read="$vault read $vault_cacert $leader_vault" | |
| vault_unseal="$vault unseal $vault_cacert $local_vault" |
That's our RC:
$ cat ws-rc.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: webserver-rc
spec:
replicas: 5
selector:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cat $HOME/.docker/config.json|jq '.auths'|sed "s/http:/https:/g"|tr '\n' ' '|tr -d '[[:space:]]'|base64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: server | |
| spec: | |
| containers: | |
| - image: resouer/sample:v2 | |
| name: war | |
| lifecycle: |
Expects one argument the name of the production stack file for Tutum.
(see https://support.tutum.co/support/solutions/articles/5000569899-stacks )
Requires these environment variables to be set
- CLOUDFLARE_DOMAIN - root domain of your app, e.g. example.com
- CLOUDFLARE_KEY - your Cloudflare API key
- CLOUDFLARE_EMAIL - your Cloudflare email address e.g. [email protected]
- PROJECT_NAME - a short name for your project e.g. example