$ curl https://discovery.etcd.io/new https://discovery.etcd.io/b97f446100a293c8107500e11c34864b
$ cat cloud-config.yaml #cloud-config coreos: etcd: # generate a new token for each unique cluster from https://discovery.etcd.io/new discovery: https://discovery.etcd.io/b97f446100a293c8107500e11c34864b # multi-region and multi-cloud deployments need to use $public_ipv4 addr: $private_ipv4:4001 peer-addr: $private_ipv4:7001 units: - name: etcd.service command: start - name: fleet.service command: start
gcutil --project=<project-id> addinstance --image=projects/coreos-cloud/global/images/coreos-beta-310-1-0-v20140508 --persistent_boot_disk --zone=us-central1-a --machine_type=n1-standard-1 --metadata_from_file=user-data:cloud-config.yaml core1 core2 core3
$ gcutil --project=coreos ssh --ssh_user=core core1
$ cat example.service [Unit] Description=MyApp After=docker.service Requires=docker.service [Service] RemainAfterExit=yes ExecStart=/usr/bin/docker run busybox /bin/echo 'I was scheduled with fleet!'
$ fleetctl start example.service $ fleetctl list-units UNIT STATE LOAD ACTIVE SUB DESC MACHINE example.service launched loaded active exited MyApp b603fc4d.../10.240.246.57
$ fleetctl status example.service ● example.service - MyApp Loaded: loaded (/run/fleet/units/example.service; linked-runtime) Active: active (exited) since Thu 2014-05-22 20:27:54 UTC; 4s ago Process: 15789 ExecStart=/usr/bin/docker run busybox /bin/echo I was scheduled with fleet! (code=exited, status=0/SUCCESS) Main PID: 15789 (code=exited, status=0/SUCCESS) May 22 20:27:54 core-01 systemd[1]: Started MyApp. May 22 20:27:57 core-01 docker[15789]: I was scheduled with fleet!
Demonstrate your proficiency to design, build and manage solutions on Google Cloud Platform.