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 ...
随机推荐
- 常用PHP函数整理
is_upload_file() 判断文件是不是通过HTTP POST 方式上传来的in_array() 判断变量在不在数组范围内move_uploaded_file() 将上传的临时名移到指定文件夹 ...
- 菜鸟学IT之IP基础
IT菜鸟,以后研究的方向是云计算,从基础的开始,这是第一篇博文.有不对的地方希望大家指正.IP是网络知识的基础,今天就开始学习IP. IP地址格式:IP地址就是"网络地址+主机地址" ...
- "!function",自执行函数表达式
如题为自执行函数表达式.在这种情况下,解析器在解析function关键字的时候,会将相应的代码解析成function表达式,而不是function声明.下面2个括弧()都会立即执行 (function ...
- BZOJ2157 旅行 模拟
题目内容: Ray 乐忠于旅游,这次他来到了T 城.T 城是一个水上城市,一共有 N 个景点,有些景点之间会用一座桥连接.为了方便游客到达每个景点但又为了节约成本,T 城的任意两个景点之间有且只有一条 ...
- 淘宝内部分享:怎么跳出MySQL的10个大坑
编者按:淘宝自从2010开始规模使用MySQL,替换了之前商品.交易.用户等原基于IOE方案的核心数据库,目前已部署数千台规模.同时和Oracle, Percona, Mariadb等上游厂商有良好合 ...
- 20170410Linux备课资料 --- 压缩与解压缩
这节课我们来学习一下压缩与解压缩,那什么是压缩与解压缩呢? 联想一下Windows系统: 选中文件,右键选择即可 如果压缩,可以选择要压缩的格式,而解压缩直接选择就可以完成了 Linux是通过命令的方 ...
- Spring-quartz 可传参(包括service注入)任务调度 多个任务调度
1 JobDetail 注意:一个JobDetail中 只能触发一个方法,如果要调度多个任务 需要有多个job类! 普通任务:总调度(SchedulerFactoryBean)--> 定时调度器 ...
- grunt构建一个项目
准备工作:grunt基于node环境运行,所有先安装node.js 1.安装grunt,通过node的npm的包管理工具 >npm install grunt --save-dev 2.npm ...
- 简单几步让网站支持https,windows iis配置方式
1.https证书的分类 SSL证书没有所谓的"品质"和"等级"之分,只有三种不同的类型.SSL证书需要向国际公认的证书证书认证机构(简称CA,Certific ...
- Android 如何本地加载pdf文件
大部分app打开pdf文件是通过intent调起手机中能打开pdf文件的工具,来查看pdf文件,如果需求是,用户在app内下载好pdf文件后,不通过第三方的工具,本地打开. 这样的需求要怎么实现呢?上 ...