Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
September2016
Using Ansible to manage instances on CloudPlatform
By
Kiran Manohar Chavala
@kiranchavala
kiranchavala@gmail...
© 2016 Accelerite. All Rights Reserved.2
Agenda
• Configuration Management
• Why Ansible is required
• Installing Ansible
...
© 2016 Accelerite. All Rights Reserved.3
Why Configuration management is important
• I need these services to be installed...
© 2016 Accelerite. All Rights Reserved.4
What is Configuration Management?
• Configuration management is the philosophy of...
© 2016 Accelerite. All Rights Reserved.5
What is Idempotent
Operations in mathematics and computer science, that can be ap...
© 2016 Accelerite. All Rights Reserved.6
How Ansible is different then Chef and Puppet
Technical:
• Client/Server architec...
© 2016 Accelerite. All Rights Reserved.7
Basic Terminologies
• Host Inventories
• Roles
• Tasks
• Variables (hosts or grou...
© 2016 Accelerite. All Rights Reserved.8
Installing Ansible
• Install a centos 6 .x machine
• yum install wget
• wget http...
© 2016 Accelerite. All Rights Reserved.9
Configuring Ansible
• yum install openssh-server openssh-clients
• Yum install gi...
© 2016 Accelerite. All Rights Reserved.10
Use Case Scenarios
• The remote machine should have set of predefined packages i...
© 2016 Accelerite. All Rights Reserved.11
Deploying Cloudstack components using Anisble
• http://docs.cloudstack.apache.or...
Thank You!
Upcoming SlideShare
Loading in …5
×
Upcoming SlideShare
Cloud stack for z Systems - July 2016
Next
Download to read offline and view in fullscreen.

Share

Using ansible to manage cloud stack

Download to read offline

How using ansible you can manage and deploy instances on cloud stack

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

Using ansible to manage cloud stack

  1. 1. September2016 Using Ansible to manage instances on CloudPlatform By Kiran Manohar Chavala @kiranchavala kiranchavala@gmail.com
  2. 2. © 2016 Accelerite. All Rights Reserved.2 Agenda • Configuration Management • Why Ansible is required • Installing Ansible • Hands on session on a practicle example of Ansible • Deploying Cloudstack Management server
  3. 3. © 2016 Accelerite. All Rights Reserved.3 Why Configuration management is important • I need these services to be installed and running • I need this configuration file to contain these lines • I need this file to exist in this directory • Centralization of configuration • Creation of reusable template configurations i.e. web servers, database servers, DHCP servers, Cloudstack management servers
  4. 4. © 2016 Accelerite. All Rights Reserved.4 What is Configuration Management? • Configuration management is the philosophy of defining the state that a server should be in wrt it’s configuration and using tools that achieve that state • CM gives centralization of configuration data and actions • Configuration Management tools should be idempotent
  5. 5. © 2016 Accelerite. All Rights Reserved.5 What is Idempotent Operations in mathematics and computer science, that can be applied multiple times without changing the result beyond the initial application. • You need to add the following lines to the default my.cnf: innodb_rollback_on_timeout=1 innodb_lock_wait_timeout=600 max_connections=350 • A sed command would add the lines sed -i -e '/symbolic-links=0/ ainnodb_rollback_on_timeout=1' -e '/symbolic-links=0/ ainnodb_lock_wait_timeout=600' -e '/symbolic-links=0/ amax_connections=350' /etc/my.cnf • But if you needed to run your script to update/restore another setting then the addition of these lines would be repeated • A configuration management tool would not add these lines aga
  6. 6. © 2016 Accelerite. All Rights Reserved.6 How Ansible is different then Chef and Puppet Technical: • Client/Server architecture not required • Only SSH connectivity required (password or public/private keys) making it easier to deploy in environments • Modules can be in any language capable of returning JSON or key=value text pairs • Has an API User: Don’t need to learn a programming language (i.e. Ruby) Chef and puppet are pull-based by default. Agent installed on the servers periodically check in with a central service and pull down con
  7. 7. © 2016 Accelerite. All Rights Reserved.7 Basic Terminologies • Host Inventories • Roles • Tasks • Variables (hosts or groups) • Modules • Templates • Playbooks
  8. 8. © 2016 Accelerite. All Rights Reserved.8 Installing Ansible • Install a centos 6 .x machine • yum install wget • wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm • wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm • sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm • yum install -y ansible
  9. 9. © 2016 Accelerite. All Rights Reserved.9 Configuring Ansible • yum install openssh-server openssh-clients • Yum install git ssh-keygen -t rsa ssh-copy-id root@remote machine you want to control [root@anscont3 playbooks1]# cat hosts ansibleremote ansible_ssh_host=10.104.49.233 ansible_ssh_port=22 [root@anscont3 playbooks1]# cat ansible.cfg [defaults] hostfile = hosts remote_user = root private_key_file=/root/.ssh/id_rsa host_key_checking = False
  10. 10. © 2016 Accelerite. All Rights Reserved.10 Use Case Scenarios • The remote machine should have set of predefined packages installed https://github.com/fifthecho/CloudStack-Template git clone https://github.com/fifthecho/CloudStack-Template.git
  11. 11. © 2016 Accelerite. All Rights Reserved.11 Deploying Cloudstack components using Anisble • http://docs.cloudstack.apache.org/en/latest/ansible.html • http://docs.ansible.com/ansible/guide_cloudstack.html • https://github.com/resmo/ansible-cloudstack
  12. 12. Thank You!

How using ansible you can manage and deploy instances on cloud stack

Views

Total views

173

On Slideshare

0

From embeds

0

Number of embeds

20

Actions

Downloads

6

Shares

0

Comments

0

Likes

0

×