Last active
February 23, 2016 06:50
-
-
Save aorjoa/198b535419e22c8ade23 to your computer and use it in GitHub Desktop.
Provision with Gattai
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
pk007server@localhost:~/WIP | |
$ cat provision.yml | |
--- | |
machines: | |
node: | |
driver: aiyara | |
instances: 3 | |
base-index: 1 | |
base-address: 192.168.5.202/24 | |
cluster-store: node-master | |
options: | |
aiyara-ip-address: $MACHINE_IP | |
aiyara-ssh-user: root | |
aiyara-ssh-key: $HOME/.ssh/id_rsa | |
aiyara-ssh-port: 22 | |
engine-install-url: http://192.168.5.201 | |
# post-provision: | |
# - docker network create -d overlay multihost | |
pre-provision: | |
- sshpass -p 1234 | |
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no | |
root@$MACHINE_IP 'mkdir ~/.ssh' | |
- cat ~/.ssh/id_rsa.pub | sshpass -p 1234 | |
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no | |
root@$MACHINE_IP 'cat > ~/.ssh/authorized_keys' | |
- cat os-release | sshpass -p 1234 | |
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no | |
root@$MACHINE_IP 'cat > /etc/os-release' | |
- sshpass -p 1234 | |
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no | |
root@$MACHINE_IP 'rm /var/log || mkdir /var/log' | |
node-master: | |
driver: aiyara | |
options: | |
aiyara-ip-address: 192.168.5.201 | |
aiyara-ssh-user: root | |
aiyara-ssh-key: $HOME/.ssh/id_rsa | |
aiyara-ssh-port: 22 | |
engine-install-url: http://192.168.5.201 | |
pre-provision: | |
- sshpass -p 1234 | |
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no | |
[email protected] 'mkdir ~/.ssh' | |
- cat ~/.ssh/id_rsa.pub | sshpass -p 1234 | |
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no | |
[email protected] 'cat > ~/.ssh/authorized_keys' | |
- cat os-release | sshpass -p 1234 | |
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no | |
[email protected] 'cat > /etc/os-release' | |
post-provision: | |
- docker run -d --net=host --name=consul aiyara/consul:0.5.2 | |
agent -data-dir /data | |
-client 192.168.5.201 | |
-server -bootstrap-expect 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
first of all, i would like to initial gattai system via command
$ gattai init
then copy above provision.yml to former provision,yml which come from gattai initial command.
after that make sure your
/etc/os-release
because it's use to provision driver (you must place fileos-release
side the provision.xml).