Two-hour openstack environment setup (keystone)

Source: Internet
Author: User
Tags etcd chrony value store
1. Create a 4G memory 2 CPU and unbutu System for the VM

Install and set the time synchronization service
APT update
APT install chrony

Vim/etc/chrony. conf

Service chrony restart
On compute
APT update
APT install chrony
Vim/etc/chrony. conf

Service chrony restart
Chronyc sources
Return to Controller
Chronyc sources
On two virtual machines
APT install software-properties-common
Add-Apt-repository cloud-archive: queens

APT Update & apt dist-Upgrade
APT install Python-openstackclient

Install and configure the MySQL database (on the 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 press enter to change the root password and press Enter.

MySQL
Exit

APT install rabbitmq-Server
Create an openstack user
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 \
Role \
-O/tmp/etcd-polic{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/usr/bin/etcd
CP/tmp/etcd/etcdctl/usr/bin/etcdctl

Vim/lib/systemd/system/etcd. Service

[Unit]
Afterdomainnetwork.tar get
Description = etcd-highly-available key value store

[Service]
Maid = 65536
Restart = on-Failure
Type = Policy
Execstart =/usr/bin/etcd -- config-file/etc/etcd. conf. yml
User = etcd

[Install]
Wantedbypolicmulti-user.tar get

Systemctl enable etcd
Systemctl start etcd
Systemctl status etcd

Install and configure the keyston Service

MySQL
Mariadb [(none)]> Create Database keystone;
Mariadb [(none)]> grant all privileges on Keystone.To 'keystone '@ 'localhost '\
Identified by 'keystone _ dbpass ';
Mariadb [(none)]> grant all privileges on Keystone.
To 'keystone '@' % '\
Identified by 'keystone _ dbpass ';

APT install keystone apache2 libapache2-mod-wsgi

UFW disable

Vim/etc/keystone/Keystone. conf
Modify the following two items:
Connection = MySQL + pymysql: // keystone: [email protected]/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

Two-hour openstack environment setup (keystone)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.