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的更多相关文章

  1. 我的第二本译作《精通OpenStack》上架啦:前言、目录和样章

    1. 前言 今天,随着新功能和子项目的增加,OpenStack已成为一个不断扩展的大型开源项目.随着数以百计大型企业采用并不断为OpenStack生态系统做出贡献,OpenStack必将成为下一代私有 ...

  2. DevOps之平台架构

    唠叨话 关于德语噢屁事的知识点,仅提供精华汇总,具体知识点细节,参考教程网址,如需帮助,请留言. DevOps平台架构(Platform Architecture) <虚拟化平台(Platfor ...

  3. CNCF CloudNative Landscape

    cncf landscape CNCF Cloud Native Interactive Landscape 1. App Definition and Development 1. Database ...

  4. CNCF LandScape Summary

    CNCF Cloud Native Interactive Landscape 1. App Definition and Development 1. Database Vitess:itess i ...

  5. ansible无网络安装openstack(Newton)

    概要 apt使用本地源,pip使用本地源 网络环境 物理机环境 网络名 网络地址 VLAN br-ex 192.168.200.250/24 90 br-mgmt 92.0.0.100/24 92 a ...

  6. 使用Ansible部署openstack平台

    使用Ansible部署openstack平台 本周没啥博客水了,就放个云计算的作业上来吧(偷个懒) 案例描述 1.了解高可用OpenStack平台架构 2.了解Ansible部署工具的使用 3.使用A ...

  7. openstack资料相关

    https://github.com/int32bit/openstack-workflow  #openstack各种时序图 http://docs.openstack.org/developer/ ...

  8. 初探ansible安装

    一.ansible介绍常用的自动化运维工具 Puppet —基于 Ruby 开发,采用 C/S 架构,扩展性强,基于 SSL,远程命令执行相对较弱SaltStack —基于 Python 开发,采用 ...

  9. ansible入门

    前言 最近看了一下ansible,挺火的一个配置管理工具,对比老大哥puppet,使用起来要简单一些,并且可以批量执行命令,对比同是python语言编写的saltstack,不需要安装客户端(基于pa ...

随机推荐

  1. 常用linux命令及其设置

    完成一个运维的工作,以下的命令和配置是经常会用到的,总结一下工作以来的命令和配置 linux常用命令 linux客户端挂接(mount)其他linux系统或UNIX系统的NFS共享 $ mkdir – ...

  2. 读书笔记 effective c++ Item 44 将与模板参数无关的代码抽离出来

    1. 使用模板可能导致代码膨胀 使用模板是节省时间和避免代码重用的很好的方法.你不需要手动输入20个相同的类名,每个类有15个成员函数,相反,你只需要输入一个类模板,然后让编译器来为你实例化20个特定 ...

  3. matlab函数:c2d离散化函数(待完善)

    Convert model from continuous to discrete time sysd =c2d(sys,Ts)sysd =c2d(sys,Ts,method)sysd =c2d(sy ...

  4. 插入排序的优化非希尔【不靠谱地讲可以优化到O(nlogn)】 USACO 丑数

    首先我们先介绍一下普通的插排,就是我们现在一般写的那种,效率是O(n^2)的. 普通的插排基于的思想就是找位置,然后插入进去,其他在它后面的元素全部后移,下面是普通插排的代码: #include< ...

  5. Python爬虫 URLError异常处理

    1.URLError 首先解释下URLError可能产生的原因: 网络无连接,即本机无法上网 连接不到特定的服务器 服务器不存在 在代码中,我们需要用try-except语句来包围并捕获相应的异常.下 ...

  6. Xcode8.3 添加iOS10.3以下旧版本模拟器

    问题起源 由于手边项目需要适配到iOS7, 但是手边的测试机都被更新到最新版本,所以有些潜在的bug,更不发现不了.最近就是有个用户提出一个bug,而且是致命的,app直接闪退.app闪退,最常见的无 ...

  7. 你不得不知的逻辑或(||)与(&&)非(!)

    最近重新翻开原生JS,又得到很多不同的体会,虽然现在开发框架那么多,但很多思想都还是离不开原生的基础.今天呢,我就根据自己的学习总结一下逻辑与(&&)和(逻辑或(||)和逻辑非(!). ...

  8. Python-一些实用的函数

    一,返回值为bool类型的函数 1.any()函数 any(iterable)->bool 当迭代器中有一个是Ture,则返回Ture:若interable=NUll,则返回False. > ...

  9. MySQL 事务与锁机制

    下表展示了本人安装的MariaDB(10.1.19,MySQL的分支)所支持的所有存储引擎概况,其中支持事务的有InnoDB.SEQUENCE,另外InnoDB还支持XA事务,MyISAM不支持事务. ...

  10. linux下删除乱码文件、目录

    由于编码原因,在linux服务器上上传.创建中文文件或目录时,会产生乱码,如果想删除它,发现用rm命令是删除不了的 这种情况下,用find命令可以删除乱码的文件或目录. 首先进入乱码文件或目录所在的目 ...