Skip to content

Instantly share code, notes, and snippets.

@gbraad
Last active August 22, 2016 09:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gbraad/36c572fe58aeee703c829c94d9dc8a95 to your computer and use it in GitHub Desktop.
Save gbraad/36c572fe58aeee703c829c94d9dc8a95 to your computer and use it in GitHub Desktop.
Spin-up test Atomic Host with OpenStack

Atomic Host with OpenStack components

This describes in short how to spin-up an Atomic Host with the OpenStack RDO components. This is currently in testing.

This host will contain all the software as an overcloud node would contain. The current version of OpenStack is Liberty. The ostree itself is hosted on GitLab as a pages and pages:deploy CI runner. The base image is a standard Fedora 23, with the ostree and rpm-ostree tools. More about this can be found in the links above and in the project README.md.

Preparation

Prepare and upload the image to glance

$ wget https://raw.githubusercontent.com/gbraad/ansible-playbooks/master/playbooks/install-openstack-client.yml
$ ansible-playbook install-openstack-client.yml
$ vi ~/.stack/dream          # or your own openrc.sh
$ wget http://cloud.centos.org/centos/7/atomic/images/CentOS-Atomic-Host-7-GenericCloud.qcow2
$ qemu-img convert CentOS-Atomic-Host-7-GenericCloud.qcow2 centos-atomic.raw
$ stack dream openstack image create --disk-format raw --container-format bare --file centos-atomic.raw atomic-host --progress
[>                             ] 0%

Launch instance

Create an instance from the uploaded image, select a valid key, network and set the following as post-creation script.

#cloud-config
password: passw0rd
chpasswd: { expire: False }
ssh_pwauth: True
runcmd:
 - [ sh, -c, 'echo -e "ROOT_SIZE=4G\nDATA_SIZE=10G" > /etc/sysconfig/docker-storage-setup']
 - echo "nameserver 8.8.8.8" > /etc/resolv.conf
 - ostree remote add --set=gpg-verify=false byo-atomic-rdo https://gbraad.gitlab.io/byo-atomic-rdo/
 - rpm-ostree rebase byo-atomic-rdo:centos-atomic-host/7/x86_64/openstack
 - systemctl reboot

Alternative

If you want, you can host the ostree yourself by downloading the artifacts archive and publishing it using your own web server, such as nginx or httpd (Apache).

# https://github.com/gbraad/dotfiles/blob/master/zsh/.zshrc.d/alias.sh
$ curl -sSL https://gitlab.com/gbraad/byo-atomic-rdo/builds/3271149/artifacts/download -o rdo-ostree.zip
$ unzip -D rdo-ostree.zip
$ cd public
$ nginx-pwd

Login

After this you can login to the node with centos which is a password-less sudo user. You can configure the services as you please with your favourite configuration tool (such as puppet, etc).

$ ssh centos@208.113.134.150
[centos@atomic-01 ~]$ openstack-status
== Nova services ==
openstack-nova-api:                     inactive  (disabled on boot)
openstack-nova-compute:                 inactive  (disabled on boot)
openstack-nova-network:                 inactive  (disabled on boot)
openstack-nova-scheduler:               inactive  (disabled on boot)
openstack-nova-cert:                    inactive  (disabled on boot)
openstack-nova-conductor:               inactive  (disabled on boot)
openstack-nova-console:                 inactive  (disabled on boot)
openstack-nova-consoleauth:             inactive  (disabled on boot)
openstack-nova-xvpvncproxy:             inactive  (disabled on boot)
== Glance services ==
openstack-glance-api:                   inactive  (disabled on boot)
openstack-glance-registry:              inactive  (disabled on boot)
== Keystone service ==
openstack-keystone:                     inactive  (disabled on boot)
== Horizon service ==
openstack-dashboard:                    uncontactable
== neutron services ==
neutron-server:                         inactive  (disabled on boot)
neutron-dhcp-agent:                     inactive  (disabled on boot)
neutron-l3-agent:                       inactive  (disabled on boot)
neutron-metadata-agent:                 inactive  (disabled on boot)
neutron-lbaas-agent:                    inactive  (disabled on boot)
neutron-openvswitch-agent:              inactive  (disabled on boot)
neutron-metering-agent:                 inactive  (disabled on boot)
== Swift services ==
openstack-swift-proxy:                  inactive  (disabled on boot)
openstack-swift-account:                inactive  (disabled on boot)
openstack-swift-container:              inactive  (disabled on boot)
openstack-swift-object:                 inactive  (disabled on boot)
== Cinder services ==
openstack-cinder-api:                   inactive  (disabled on boot)
openstack-cinder-scheduler:             inactive  (disabled on boot)
openstack-cinder-volume:                inactive  (disabled on boot)
openstack-cinder-backup:                inactive  (disabled on boot)
== Ceilometer services ==
openstack-ceilometer-api:               inactive  (disabled on boot)
openstack-ceilometer-central:           inactive  (disabled on boot)
openstack-ceilometer-compute:           inactive  (disabled on boot)
openstack-ceilometer-collector:         inactive  (disabled on boot)
openstack-ceilometer-alarm-notifier:    inactive  (disabled on boot)
openstack-ceilometer-alarm-evaluator:   inactive  (disabled on boot)
openstack-ceilometer-notification:      inactive  (disabled on boot)
== Heat services ==
openstack-heat-api:                     inactive  (disabled on boot)
openstack-heat-api-cfn:                 inactive  (disabled on boot)
openstack-heat-api-cloudwatch:          inactive  (disabled on boot)
openstack-heat-engine:                  inactive  (disabled on boot)
== Sahara services ==
openstack-sahara-all:                   inactive  (disabled on boot)
== Ironic services ==
openstack-ironic-api:                   inactive  (disabled on boot)
openstack-ironic-conductor:             inactive  (disabled on boot)
== Support services ==
libvirtd:                               active
openvswitch:                            inactive  (disabled on boot)
dbus:                                   active
rabbitmq-server:                        inactive  (disabled on boot)
memcached:                              inactive  (disabled on boot)
== Keystone users ==
Warning keystonerc not sourced
[centos@atomic-01 ~]$ 

Note

  • If you have issues with "no space left on device", you could consider resizing atomic-root.
  • Currently builds are triggered manually. (CI runner is explictly setup this way, but willl change over time to be trigger from rdo-atomic instead of byo-atomic-rdo.
  • Further development and testing to create a functional OpenStack deployment will happen in the rdo-atomic-cloud repository.
  • Tested on DreamCompute ...

Suggestions and improvements are welcomed...

Gerard Braad me@gbraad.nl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment