View
136
Download
4
Category
Preview:
Citation preview
Orchestration and CI/CDin the OpenStack Cloud
by Simone Soldateschi@soldasimo
20150731
Who I am● Senior DevOps Engineer, Sydney● Lead DevOps Team at Rackspace AU● ~15 years of experience as
○ Software Eng○ Systems Eng○ Been DevOps'in for the last 5-ish years
Simone Soldateschi
● Task Automation○ Chef, Ansible○ Heat○ Python
● Cloud (OpenStack)○ dev → live○ Autoscale
What do I do?
Outline
● pipeline to build container
● full stack
● orchestration
● service discovery
● pipeline to go live
$ curl https://discovery.etcd.io/new
https://discovery.etcd.io/b42a0e4720728d4fa9ecf06a68102294
Build container...RUN apt-get -qqy install git nodejs npmRUN ln -s /usr/bin/nodejs /usr/bin/node
# Install reveal.jsWORKDIR /optRUN git clone https://github.com/hakimel/reveal.js.gitWORKDIR /opt/reveal.jsRUN npm install -g grunt-cliRUN npm installRUN sed -i "s/port: port/port: port,\n\t\t\t\t\thostname: \'\'/g" Gruntfile.js...EXPOSE 8000CMD [ "grunt", "serve" ]
// suboptimal solution
Repository
Public Hub Private Registry
Composelb: image: haproxydb: image: mysqlweb: image: httpd ports: - "80:80" volumes: - ./vhosts:/var/www/vhosts links: - lb - db
Register Web Container
CoreOs Cluster
Etcd
while true; do etcdctl set /announce/services/apache80 ${COREOS_PUBLIC_IPV4}:80 --ttl 60sleep 45
done
Discover Web Container
CoreOs Cluster
Etcd
while true; do etcdctl get /announce/services/apache80# reconfigure HA Proxysleep 60
done
Lesson Learned
● CoreOS for HA Cluster it’s easy!
● Pipeline to build container repeatable● let services run as desired it’s easy!
● service discovery it’s easy!● CI/CD pipelines repeatable
«All Configuration Management Systems suck,Ansible just sucks less»
Recommended