博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
利用saltstack初始化OpenStack服务器环境
阅读量:4964 次
发布时间:2019-06-12

本文共 2228 字,大约阅读时间需要 7 分钟。

目录架构图如上图所示

sls脚本详情如下:

Sync_Host:  file.managed:    - name: /etc/hosts    - source: salt://state/files/hosts    - user: root    - group: root    - mode: 644install_httpd:  pkg.installed:    - name: httpd    - name: httpd-develhttpd_running:  service.running:    - name: httpd    - enable: True    - require:      - pkg: install_httpd    - watch:      - file: httpd_confhttpd_conf:  file.managed:    - name: /etc/httpd/conf/httpd.conf    - source: salt://state/files/httpd.conf    - user: root    - group: root    - mode: 644    - template: jinja    - defaults:      hostname: localhostcp_openstack_source:  file.managed:    - name: /var/www/html/openstack-mitaka-rpms.tar.gz    - source: salt://state/files/openstack-mitaka-rpms.tar.gz    - user: root    - group: root    - mode: 644uncompress_openstackPack:  cmd.run:    - name: cd /var/www/html && tar xf openstack-mitaka-rpms.tar.gz && mv openstack-mitaka-rpms.tar.gz /tmpmv_old_epel:  cmd.run:    - name: cd /etc/yum.repos.d && mv *.repo /tmpmitaka_repo:  file.managed:    - name: /etc/yum.repos.d/mitaka.repo    - source: salt://state/files/mitaka.repo    - user: root    - group: root    - mode: 644    - template: jinja    - default:      IP: 192.168.74.155all_install:  cmd.run:    - name: yum clean all && yum install vim -yyum_conf:  file.managed:    - name: /etc/yum/yum-cron.conf    - source: salt://state/files/yum-cron.conf    - user: root    - group: root    - mode: 644install_openstack_pre:  pkg.installed:    - name: openstack_pre    - pkgs:      - python-openstackclient      - openstack-selinux      - chronystop_selinux_firewalld:  cmd.run:    - name: sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config && systemctl disable firewalld.service && systemctl stop firewalld.servicentp_conf:  file.managed:    - name: /etc/chrony.conf    - source: salt://state/files/chrony.conf    - user: root    - group: root    - mode: 644ntp_running:  service.running:    - name: chronyd    - enable: True    - require:      - pkg: install_openstack_pre    sync_time:  cmd.run:    - name: chronyc sources

因配置很长,就不贴出来了,我把用到的东西传到百度云里,需要的就自己下载吧 链接: http://pan.baidu.com/s/1o8yliFC 密码: mt3q,接下来继续完成吧,争取完成一键部署openstack架构

转载于:https://www.cnblogs.com/uglyliu/p/6842116.html

你可能感兴趣的文章
rest_framework-02-权限-内置权限源码流程
查看>>
JavaWeb学习总结第五篇--认识Cookie机制
查看>>
网站运行编译器错误CS1617: 选项“6”对 /langversion 无效;必须是 ISO-1、ISO-2、3、4、5 或 Default...
查看>>
git 删除目录
查看>>
swiper 最后一页继续滑动跳转问题
查看>>
带有停止按钮的计时程序
查看>>
Tomcat: Connector中HTTP与AJP差别与整合
查看>>
使用Pelican在Github(国外线路访问)和Coding(国内线路访问)同步托管博客
查看>>
iOS | Runtime应用
查看>>
Codeforces 898F 字符串hash
查看>>
JVM常用工具使用
查看>>
项目实战房租网 mongdb
查看>>
AngularJS 特性—SinglePage、template、Controller
查看>>
Java向上保留两位小数
查看>>
在Windows下配置多用户远程桌面连接
查看>>
hdu1083二分图匹配模板题
查看>>
我的未来路
查看>>
java—泛型
查看>>
luogu解题报告:P2178[NOI2015]品酒大会
查看>>
【黑金原创教程】【FPGA那些事儿-驱动篇I 】实验九:PS/2模块③ — 键盘与多组合键...
查看>>