内容简介:一、新建虚拟机4g内存2cpu,unbutu系统安装并设置时间同步服务apt update
一、新建虚拟机4g内存2cpu,unbutu系统
安装并设置时间同步服务
apt update
apt install chrony
vim /etc/chrony/chrony.conf
service chrony restart
compute上
apt update
apt install chrony
vim /etc/chrony/chrony.conf
service chrony restart
chronyc sources
回到controller
chronyc sources
在两台虚拟机上
apt install software-properties-common
add-apt-repository cloud-archive:queens
apt update && apt dist-upgrade
apt install python-openstackclient
安装并配置 mysql 数据库(controller上)
apt install mariadb-server python-pymysql
vim /etc/mysql/mariadb.conf.d/99-openstack.cnf
[mysqld]
bind-address = 10.0.0.11
default-storage-engine = innodb
innodb_file_per_table = on
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
service mysql restart
mysql_secure_installation 回车 更改一下root密码 一路回车即可
mysql
exit
apt install rabbitmq-server
创建openstack用户
rabbitmqctl add_user openstack 123456
rabbitmqctl set_permissions openstack ". " ". " ".*"
apt install memcached python-memcache
vim /etc/memcached.conf
service memcached restart groupadd --system etcd useradd --home-dir "/var/lib/etcd" \ --system \ --shell /bin/false \ -g etcd \ etcd
mkdir -p /etc/etcd chown etcd:etcd /etc/etcd mkdir -p /var/lib/etcd chown etcd:etcd /var/lib/etcd
.
ETCD_VER=v3.2.7
rm -rf /tmp/etcd && mkdir -p /tmp/etcd
curl -L \
https://github.com/coreos/etcd/releases/download/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz \
-o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz \
-C /tmp/etcd --strip-components=1
cp /tmp/etcd/etcd /usr/bin/etcd
cp /tmp/etcd/etcdctl /usr/bin/etcdctl
vim /lib/systemd/system/etcd.service
[Unit] After=network.target Description=etcd - highly-available key value store [Service] LimitNOFILE=65536 Restart=on-failure Type=notify ExecStart=/usr/bin/etcd --config-file /etc/etcd/etcd.conf.yml User=etcd [Install] WantedBy=multi-user.target
systemctl enable etcd
systemctl start etcd
systemctl status etcd
安装并配置keyston服务
mysql
MariaDB [(none)]> CREATE DATABASE keystone;
TO 'keystone'@'localhost' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
TO 'keystone'@'%' \IDENTIFIED BY 'KEYSTONE_DBPASS';
apt install keystone apache2 libapache2-mod-wsgi
ufw disable
vim /etc/keystone/keystone.conf
修改下面两项
connection = mysql+pymysql://keystone:KEYSTONE_DBPASS@controller/keystone
provider = fernet
su -s /bin/sh -c "keystone-manage db_sync" keystone
keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
keystone-manage credential_setup --keystone-user keystone --keystone-group keystone
keystone-manage bootstrap --bootstrap-password ADMIN_PASS --bootstrap-admin-url http://controller:5000/v3/ --bootstrap-internal-url http://controller:5000/v3/ --bootstrap-public-url http://controller:5000/v3/ --bootstrap-region-id RegionOne
vim /etc/apache2/apache2.conf
ServerName controller
service apache2 restart
vim default-env
export OS_USERNAME=admin
export OS_PASSWORD=123456
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_AUTH_URL= http://controller:5000/v3
export OS_IDENTITY_API_VERSION=3
mv default-env /home/lxc/
chown lxc:lxc /home//lxc//default-env
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- golang[70]-未完待续....
- mysql-事务管理(进阶)--待续
- CSS-伪类选择器(未完待续。。。)
- 你不知道的JavaScript上卷-读书笔记 - 未完待续...不用点开了~
- 从0到1搭建推荐策略产品的思考(二):如何搭建?
- Docker搭建disconf环境,三部曲之三:细说搭建过程
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。