Openstack & Ansible
Opennstack
Open source software for creating private and public clouds
Manages the servers at these sites so you can create Virtual Machines (VMs) for your apps / services to run on
Can create VMs using the UI or through scripts
Once created, can click on the instance name in the UI to find the IP
nslookup on the IP to find the hostname (hostname can be worked out from the Openstack account and the instance name as well)
SSH onto the IP / host as root, using the appropriate private key
Check instance has correct resources by running lscpu / free -h / df -h
Heat
Heat is the main project in the OpenStack Orchestration program (Orchestration: Coordinate servers to work together). It implements an orchestration engine to launch multiple composite cloud applications based on templates in the form of text files that can be treated like code.
A heat template can create multiple volumes & VMs
heat stack-create \
-f openstack/templates/demo-template.yaml \
cr-demo
Openstack vs AWS vs Raw tin
Openstack is mainly for creating private cloud and is open source while AWS is mainly a public cloud.
Network speed in AWS would be slower than that in Openstack, as the AWS machines are in Ireland.
Network speed in Openstack would be slower than that in raw tin servers, as the openstack servers have an virtualization layer.
Ansible
After created blan VM in openstack, could use Ansible to create non-root users, copy ssh keys, install java, install/delete cronjobs
“[Ansible] can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates”
Why not Puppet / Chef / x?
No need for a ‘master’ node (just run from your laptop!)
Inventory Files
Specify which servers to configure
Group servers together (eg. ‘Dash Servers’)
Can be Static or Dynamic
Static = hard-coded IPs or hostnames
Dynamic = query a provider like AWS… Or Openstack!
Roles
Define a set of tasks to apply to a group of servers
Eg. group together tasks for a standard Java app server, and apply those tasks to all Java app servers
Tasks
Define specific actions to carry out on a server
Eg. Install Java 8
Eg. Copy file x from my Ansible repo to the server
Eg. Copy template y from my Ansible repo to the server
Eg. Restart service z on the server
Variables
Tasks and templates may reference variables
Variables can be set against:
Specific servers (in inventory files / inventory folders)
Groups of servers (in group_vars)
Conclusion
- Statically create VMs in Openstack
- Use Ansible to manage VMs
Installing software (Java, sqlite, filebeat, etc)
Managing app scripts (deploy / stop / start)
Managing cronjobs (log deletion scripts)
Managing SSH Keys
Managing config (New Relic, filebeat)
Openstack & Ansible的更多相关文章
- 我的第二本译作《精通OpenStack》上架啦:前言、目录和样章
1. 前言 今天,随着新功能和子项目的增加,OpenStack已成为一个不断扩展的大型开源项目.随着数以百计大型企业采用并不断为OpenStack生态系统做出贡献,OpenStack必将成为下一代私有 ...
- DevOps之平台架构
唠叨话 关于德语噢屁事的知识点,仅提供精华汇总,具体知识点细节,参考教程网址,如需帮助,请留言. DevOps平台架构(Platform Architecture) <虚拟化平台(Platfor ...
- CNCF CloudNative Landscape
cncf landscape CNCF Cloud Native Interactive Landscape 1. App Definition and Development 1. Database ...
- CNCF LandScape Summary
CNCF Cloud Native Interactive Landscape 1. App Definition and Development 1. Database Vitess:itess i ...
- ansible无网络安装openstack(Newton)
概要 apt使用本地源,pip使用本地源 网络环境 物理机环境 网络名 网络地址 VLAN br-ex 192.168.200.250/24 90 br-mgmt 92.0.0.100/24 92 a ...
- 使用Ansible部署openstack平台
使用Ansible部署openstack平台 本周没啥博客水了,就放个云计算的作业上来吧(偷个懒) 案例描述 1.了解高可用OpenStack平台架构 2.了解Ansible部署工具的使用 3.使用A ...
- openstack资料相关
https://github.com/int32bit/openstack-workflow #openstack各种时序图 http://docs.openstack.org/developer/ ...
- 初探ansible安装
一.ansible介绍常用的自动化运维工具 Puppet —基于 Ruby 开发,采用 C/S 架构,扩展性强,基于 SSL,远程命令执行相对较弱SaltStack —基于 Python 开发,采用 ...
- ansible入门
前言 最近看了一下ansible,挺火的一个配置管理工具,对比老大哥puppet,使用起来要简单一些,并且可以批量执行命令,对比同是python语言编写的saltstack,不需要安装客户端(基于pa ...
随机推荐
- PT20150801隆重开班
PT20150801隆重开班 伴随着秋天的的脚步,带着对梦想的憧憬,POPTEST1508期学员步入正式学习阶段:POPTEST的课程内容吸收了互联网公司先进技术的特点,同时坚持深入浅出的教育特点,完 ...
- Oracle常见错误集锦
1.ORA-12560:TNS:协议适配器错误 OracleService<SID>服务没有启动 2. ORA-12541:TNS:无监听程序 Oracle<ORACLE_HOME& ...
- Hibernate基础学习(四)—对象-关系映射(上)
一.映射对象标识符 Java语言按内存地址来识别或区分同一个类的不同对象,而关系数据库按主键值来识别或区分同一个表的不同记录.Hibernate使用对象标识符(OID)来建立内存中的对象和数 ...
- 设计模式的征途—3.工厂方法(Factory Method)模式
上一篇的简单工厂模式虽然简单,但是存在一个很严重的问题:当系统中需要引入新产品时,由于静态工厂方法通过所传入参数的不同来创建不同的产品,这必定要修改工厂类的源代码,将违背开闭原则.如何实现新增新产品而 ...
- Anaconda配置多spyder多python环境
作者:桂. 时间:2017-04-17 22:02:37 链接:http://www.cnblogs.com/xingshansi/p/6725298.html 前言 最近在看<统计学习方法 ...
- IO流中的Stream相关对象
流无处不在,只要是关于到文件的输入.输出.更新等,关于IO流,项目中还是经常用到的,写log日志免不了要与其打交道,现在需要用到,就顺道好好回顾一下进行整理,首先是几个需要用到的类的说明,其实说简单点 ...
- Named function expressions demystified
Introduction Surprisingly, a topic of named function expressions doesn't seem to be covered well eno ...
- MVC实现SSO
近来工作无事,想做个SSO, 之前做过一个项目用到SSO,自己也没有看明白是个什么东西.现在正好有时间,所以想研究下. 先是从网上看到了SSO的思路: 三个站点:SiteA,SiteB,SiteMai ...
- 设备offline时如何自动重置
在linux底层 Linux/include/uapi/linux/usbdevice_fs.h中,重置_IO('U', 20)可以重置usb设备. 因此,我们可以在脚本中利用这个方法去重置USB 代 ...
- aProxy: 带认证授权和权限控制的反向代理
前段时间很多数据库因为没有做好权限控制暴露在外网被删然后遭勒索的事件,而类似的有些内网的web服务也会被开放到公网并且没有做任何权限控制的,这样也会有一定的风险.所以就决定写篇文章简单介绍一个小工具. ...