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 ...
随机推荐
- ORACLE JOB创建
Connected Connected as focususer SQL> SQL> --JOB 需要在命令行执行: SQL> --抽数job SQL> CREATE OR R ...
- wampserver安装错误 应用程序无法正常启动0xc000007b解决方法
在重装系统之后发现以前安装的wampserver启动会出现错误提示"应用程序无法正常启动0xc000007b解决方法",重新安装也是一样的错误.上网找了相关信息后发现,并不是只有本 ...
- 线上分享会.net框架“ABP”分享会总结
前言 为了能够帮助.Net开发者开拓视野,更好的把最新的技术应用到工作中,我在3月底受邀到如鹏网.net训练营直播间为各位学弟学妹们进行ABP框架的直播分享.同时为了让更多的.NET开发者了解ABP框 ...
- JS数组根据属性来实现排序
var data = [{ name: "zhao", age: }, { name: "qian", age: }, { name: "sun&qu ...
- .Net MVC4笔记之js css引用与压缩
1.引用时,可以用即可以直接使用“~”来表示根目录. 引入js 引入js 引入css <link href="~/Content/uploadify/uploadify.css&quo ...
- 使用上传插件 Web Uploader 上传图片到七牛云(C#)
之前有写过一篇文章,基于asp.net mvc 封装 Web Uploader 上传插件: http://www.cnblogs.com/vanteking/p/5623682.html 已经实现的功 ...
- angular中路由的实现(针对新手)
最近搜了一下网上的教程,看完总感觉有点糊涂,对于新手来说可能云里雾里,所以写一个最简单的路由来给大家做个指引. 首先当然需要准备angular,下载地址:https://angular.io/ 现在a ...
- CSS样式表初学,比C#和JS简单
今天咱们一起来看下CSS样式表的基本基础 经常看博客或者喜欢钻研代码这一类的人对CSS可能有所耳闻,但具体的可能不是很清楚 那什么是CSS呢?与HTML又有什么区别呢?今天咱们就来说道下这个CSS C ...
- MySQL最常用字符串函数
字符串函数 是最常用的的一种函数,在一个具体应用中通常会综合几个甚至几类函数来实现相应的应用: 1.LOWER(column|str):将字符串参数值转换为全小写字母后返回 mysql> sel ...
- RabbitMQ基础
上一博客把RabbitMQ的安装配置介绍了下,今天主要是介绍下RabbitMQ的一些基础名词. 一.什么是RabbitMQ?用它能做什么? 1.简介 AMQP,即Advanced Message Qu ...