Kolla安装单节点Ocata
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Kolla安装单节点Ocata相关的知识,希望对你有一定的参考价值。
安装源配置
# cat /etc/yum.repos.d/centos.repo
[base]
name=CentOS-$releasever
enabled=1
baseurl=http://mirrors.aliyun.com/centos/7.3.1611/os/x86_64/
gpgcheck=0
[updates]
name=CentOS-$releasever
enabled=1
baseurl=http://mirrors.aliyun.com/centos/7.3.1611/updates/x86_64/
gpgcheck=0
[extras]
name=CentOS-$releasever
enabled=1
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7.3.1611/extras/x86_64/
gpgcheck=0
# cat /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 7- $basearch
enabled=1
baseurl=https://mirrors.aliyun.com/epel/7/x86_64/
gpgcheck=0
# tee /etc/yum.repos.d/docker.repo <<‘EOF‘
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
# yum update -y
装包
# yuminstall python-devel libffi-devel gcc openssl-devel git python-pip -y
# yuminstall docker-engine-1.12.5 docker-engine-selinux-1.12.5 -y
# pip install -U pip
配置
# mkdir/etc/systemd/system/docker.service.d
# tee /etc/systemd/system/docker.service.d/kolla.conf<< ‘EOF‘
[Service]
MountFlags=shared
EOF
# vim /usr/lib/systemd/system/docker.service
#ExecStart=/usr/bin/dockerd
ExecStart=/usr/bin/dockerd--insecure-registry 192.168.252.132:4000
Registry 服务器
# docker run -d -v/opt/registry:/var/lib/registry -p 4000:5000 \
--restart=always --name registry registry:2
# wgethttp://tarballs.openstack.org/kolla/images/centos-source-registry-ocata.tar.gz
# tar zxvf centos-source-registry-ocata.tar.gz -C /opt/registry/
kolla-ansible
# cd /home
# git clone http://git.trystack.cn/openstack/kolla-ansible-b stable/ocata
# cd kolla-ansible
# cp ansible/inventory/*/home/
# mkdir -p /etc/kolla/config/nova
cat << EOF > /etc/kolla/config/nova/nova-compute.conf
[libvirt]
virt_type=qemu
cpu_mode = none
EOF
# kolla-genpwd
# vim /etc/kolla/passwords.yml
keystone_admin_password: Abcd1234 ##必须字母,纯数字不行
kolla_internal_vip_address: "192.168.252.133"
openstack_release: "4.0.3" ###通过docker imgaes确定
docker_registry: "192.168.252.132:4000"
docker_namespace:"lokolla"
network_interface: "ens33"
neutron_external_interface: "ens34"
# kolla-ansibleprechecks -i /home/all-in-one
# kolla-ansible deploy-i /home/all-in-one
验证
# pip install python-openstackclient
# kolla-ansiblepost-deploy ###自动创建/etc/kolla/admin-openrc.sh
# . /etc/kolla/admin-openrc.sh
# vim /usr/share/kolla-ansible/init-runonce
IMAGE_URL=http://download.cirros-cloud.net/0.3.5/
IMAGE=cirros-0.3.5-x86_64-disk.img
IMAGE_NAME=cirros
EXT_NET_CIDR=‘192.168.102.0/24‘
EXT_NET_RANGE=‘start=192.168.102.114,end=192.168.102.119‘
EXT_NET_GATEWAY=‘192.168.102.254‘
./init-runonce
#
参考沙克老师的文章
http://www.chenshake.com/kolla-installation/
以上是关于Kolla安装单节点Ocata的主要内容,如果未能解决你的问题,请参考以下文章
使用考拉(kolla)和docker构建单节点openstack