码迷,mamicode.com
首页 > 其他好文 > 详细

kolla单节点部署openstack

时间:2018-11-15 12:08:08      阅读:228      评论:0      收藏:0      [点我收藏+]

标签:admin   neu   单节点   依赖   pytho   wget   id_rsa   环境变量   qemu   

virtualbox环境:

双网卡:enp0s3(桥接)   192.168.102.194

    enp0s8(仅主机)   192.168.42.3

块存储  50G

关闭防火墙,selinux。

配置yum源:wget  http://mirrors.aliyun.com/repo/Centos-7.repo

      yum install epel-release -y

配置主机名:hostnamectl set-hostname kolla

      vi /etc/hosts

      192.168.42.3  kolla

配置互信:ssh-keygen

     ssh-copy-id -i ~/.ssh/id_rsa.pub root@kolla

 

 

一,安装依赖

     yum install python-pip

     pip install -U pip

     yum install python-devel libffi-devel gcc openssl-devel libselinux-python

     pip install -U ansible

     mkdir  /etc/ansible

     vi  /etc/ansible/ansible.cfg

      [defaults]

   host_key_checking=False

   pipelining=True

   forks=100



二,安装kolla-ansible

      pip install kolla-ansible

      cp -r /usr/share/kolla-ansible/etc_examples/kolla /etc/kolla/

       cp /usr/share/kolla-ansible/ansible/inventory/* .

    将all-in-one文件中的localhost那一行注释,并在下行添加kolla

  vi  /etc/kolla/global.yml

   kolla_base_distro: "centos"

   kolla_install_type: "source"

   openstack_release: "queens"

    network_interface: "enp0s8"

   kolla_internal_vip_address: "192.168.42.3"

  neutron_external_interface: "enp0s8"

   enable_cinder: "no"

   enable_haproxy: "no"

   nova_compute_virt_type: "qemu"           全虚拟化模式

   keystone_token_provider: ‘fernet‘

  生成随机密码文件

   kolla-genpwd

  vi /etc/kolla/password.yml

  keystone_admin_password: admin

三,部署

   kolla-ansible -i all-in-one bootstrap-servers

   kolla-ansible -i all-in-one prechecks

   kolla-ansible -i all-in-one pull                      #第一次执行若有failed,再执行一次

   kolla-ansible -i deploy

生成环境变量脚本

  kolla-ansible post-deploy -i all-in-one

        .  /etc/kolla/admin-openrc.sh

安装openstack命令行客户端

  pip install python-openstackclient python-glanceclient python-neutronclient --ignore-installed

初始化运行环境

  . /usr/share/kolla-ansible/init-runonce

 

 


日志:/var/lib/docker/volumes/kolla_logs/_data/

销毁环境:kolla-ansible destroy -i all-in-one --yes-i-really-really-mean-it

 

 

 

参考:https://docs.openstack.org/project-deploy-guide/kolla-ansible/queens/quickstart.html

   https://my.oschina.net/LastRitter/blog/1617079

 

kolla单节点部署openstack

标签:admin   neu   单节点   依赖   pytho   wget   id_rsa   环境变量   qemu   

原文地址:https://www.cnblogs.com/tozh/p/9962405.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!