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 ...
随机推荐
- 玩转 SSH(六):SpringMVC + MyBatis 架构搭建(注解版)
一.创建 SSMVCAnnoDemo 项目 点击菜单,选择“File -> New Project” 创建新项目.选择使用 archetype 中的 maven-webapp 模版创建. 输入对 ...
- php运算时默认的类型转换
php属于弱类型语言,使用数据时无需指定其数据类型.对于学C语言入门的我,刚刚接触时感觉很神奇,但是随之而来的也有烦恼. 总结一下php中默认的类型转换,按照运算符类型,只总结能够自动做类型转换的运算 ...
- 浩哥解析MyBatis源码(七)——DataSource数据源模块之托管数据源
原创作品,可以转载,但是请标注出处地址:http://www.cnblogs.com/V1haoge/p/6675700.html 1 回顾 之前介绍的非池型与池型数据源都是MyBatis自己定义的内 ...
- 鼠标滚动:mousewheel事件在Firefox采用DOMMouseScroll事件的统一处理
这是一个小事件,但当下的WEB应用交互非常丰富,判断鼠标的滚动来执行相应的操作是比较常见的.我用Chrome/IE/Firefox/Opera 4种浏览器做测试,发现只有firefox的处理方法有很大 ...
- Vxlan与网卡offload性能
背景 由于数据链路层MTU的限制,发送端TCP/UDP数据在交付到IP层时需要与MTU相匹配,TCP数据不能超过mss,较长的UDP需要分片(Fragmentation)以满足MTU要求:接收端协议栈 ...
- [Android]Gradle 插件 DiscardFilePlugin(class注入&清空类和方法)
以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/6732128.html Android Gradle 插件 Di ...
- T_SQL编程赋值、分支语句、循环
咱们在C#中会常用到赋值.循环.分支语句什么的 今天咱们来看下当初在C#用到的一点东西放到SQL中是怎么使用的 创建变量 在C#中创建一个值类型变量很简单 int a:这就可以了 SQL: decla ...
- Java设计模式:代理模式(一)
问题的提出 现在生活中,常常在微信朋友圈里面看到代购的信息,你想在国外买什么,香港买什么,但是又懒得自己过去,于是常常委托别人帮忙买奶粉买那啥的.这类问题的缘由是因为客户和原产地没有直接的接触,所以需 ...
- js继承与闭包(笔记)
1.一切引用类型都是对象,对象时属性的集合:typeof null === 'object'(例外): 2.对象都是通过函数创建来的,比如var obj = new Object();typeof O ...
- xml语法规则
所有 XML 元素都须有关闭标签 在 HTML,经常会看到没有关闭标签的元素: <p>This is a paragraph <p>This is another paragr ...