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 ...
随机推荐
- C#中关于WebBrowser的一些细节设置
在winform中有一个控件可以显示html的内容,该控件就是webbrowser,设置它的DocumenText属性为HTML的内容即可. 在使用WebBrowser做UI的时候,我们有时不希望里面 ...
- Jmeter函数组件开发
插件开发方法有两种: 一.在jmeter官网下载jmeter源码,在源码里面新加函数,然后导出jar: 二.不下载源码,直接导入jmeter相应的jar包,即可开发.(推荐) 下面介绍第二种开发方法: ...
- javascript执行顺序小结
作为web开发人员,一定要对js的执行顺序,解析原理有一定了解,否则无法掌控这门小巧好用的语言 javascript是一门实现网页动态效果的语言,也是主要负责和服务端的交互,他抛弃了像java中类的束 ...
- Myeclipse8.5开发-插件安装二:安装findbugs方法
环境:Myeclipse8.5 step 1:首先从官网下载findbugs插件:http://downloads.sourceforge.net/project/findbugs/findbugs% ...
- Entity Framework快速入门--ModelFirst
Entity Framework带给我们的不仅仅是操作上的方便,而且使用上也很是考虑了用户的友好交互,EF4.0与vs2010的完美融合也是我们选择它的一个理由吧.相比Nhibernate微软这方面做 ...
- android设备使用usb串口传输数据
首先介绍两个开源项目一个是Google的开源项目:https://code.google.com/archive/p/android-serialport-api/ 另一个是我们这次介绍的开源项目:h ...
- kmp(看毛片)算法
别人的两篇博客. 传送门1 传送门2 其中T为主串,P为模式串. 其实就是在T中找P. 其中next数组存的是"部分匹配值". "部分匹配值"就是"前 ...
- 2017最新苹果 APPLE ID注册流程
不管你是苹果开发者还是苹果爱好者,只要你手中有苹果的终端(IPHONE .IPAD .ITouch,MAC电脑) 你想用苹果的一些服务,你就必须要申请苹果APPLE ID,才能享受到苹果提供高品质的服 ...
- IDEA第四章----配置模板
idea提供很多模板从而提高编写代码的效率,比如说一些经常用的代码及生成文件时的模板. 第一节:实时代码模板 顾名思义,实时代码模板是指在编写程序中输入一段固定的字母可以快速生成自己想要的代码,例如: ...
- 使用Eclipse Memory Analyzer Tool(MAT)分析线上故障(一) - 视图&功能篇
Eclipse Memory Analyzer Tool(MAT)相关文章目录: 使用Eclipse Memory Analyzer Tool(MAT)分析线上故障(一) - 视图&功能篇 使 ...