Skip to content

Instantly share code, notes, and snippets.

@xiaods
Last active November 22, 2015 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save xiaods/cad89070ccc66930a4a7 to your computer and use it in GitHub Desktop.
Save xiaods/cad89070ccc66930a4a7 to your computer and use it in GitHub Desktop.
setup coreos image on openstack step
# https://coreos.com/docs/running-coreos/platforms/openstack/
Step one:
```
$ wget http://alpha.release.core-os.net/amd64-usr/current/coreos_production_openstack_image.img.bz2
$ bunzip2 coreos_production_openstack_image.img.bz2
$ glance image-create --name CoreOS \
--container-format bare \
--disk-format qcow2 \
--file coreos_production_openstack_image.img \
--is-public True
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 4742f3c30bd2dcbaf3990ac338bd8e8c |
| container_format | ovf |
| created_at | 2013-08-29T22:21:22 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | cdf3874c-c27f-4816-bc8c-046b240e0edd |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | coreos |
| owner | 8e662c811b184482adaa34c89a9c33ae |
| protected | False |
| size | 363660800 |
| status | active |
| updated_at | 2013-08-29T22:22:04 |
+------------------+--------------------------------------+
```
Step two:
```
#cloud-config
coreos:
etcd:
# generate a new token for each unique cluster from https://discovery.etcd.io/new
discovery: https://discovery.etcd.io/<token>
# 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
ssh_authorized_keys:
# include one or more SSH public keys
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0g+ZTxC7weoIJLUafOgrm+h...
```
setup 3:
```
nova boot \
--user-data ./cloud-config.yaml \
--image cdf3874c-c27f-4816-bc8c-046b240e0edd \
--key-name coreos \
--flavor m1.medium \
--num-instances 3 \
--security-groups default coreos
```
setup 4:
$ chmod 400 core.pem
$ ssh -i core.pem core@10.0.0.3
______ ____ _____
/ ____/___ ________ / __ \/ ___/
/ / / __ \/ ___/ _ \/ / / /\__ \
/ /___/ /_/ / / / __/ /_/ /___/ /
\____/\____/_/ \___/\____//____/
core@10-0-0-3 ~ $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment