Openstack-rocky Edition Standalone Deployment

Source: Internet
Author: User

1. Installation Environment:

centos 7.5192.168.254.10 openstack-server

2. System configuration:

[[email protected] ~]# hostname openstack-server.smoke.com[[email protected] ~]# vim/etc/ Hostnameopenstack-server.smoke.com[[email protected] ~]# vim/etc/hosts192.168.254.10 openstack-server Openstack-server.smoke.com[[email protected] ~]# ifconfigenp4s0:flags=4163<up,broadcast,running, Multicast> MTU inet 192.168.254.10 netmask 255.255.255.224 broadcast 192.168.254.31 Inet6 fe80::1        19a:26d0:b028:74d0 prefixlen ScopeID 0x20<link> ether 00:e0:4c:0f:ff:a9 txqueuelen (Ethernet)   Rx Packets 42277 Bytes 39441483 (37.6 MiB) Rx errors 0 dropped 0 overruns 0 frame 0 TX packets 14912 Bytes 1016294 (992.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo:flags=73<up,loopback,r        Unning> MTU 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6:: 1 prefixlen ScopeID 0x10

3. Install time Synchronization Service NTP:
[[email protected] ~]# yum install chrony

Chrony Time Server configuration:

[[email protected] ~]# vim /etc/chrony.confallow 192.168.254.0/27

To start the Chrony service:

[[email protected] ~]# systemctl enable chronyd.service[[email protected] ~]# systemctl start chronyd.service

Set the time zone:
[[email protected] ~]# timedatectl set-timezone Asia/Shanghai

4. Install Ali's OpenStack Source:

[[email protected] ~]# vim /etc/yum.repos.d/OpenStack-Rocky.repo[openstack-rocky]name=openstack-rockybaseurl=https://mirrors.aliyun.com/centos/7.5.1804/cloud/x86_64/openstack-rocky/gpgcheck=0gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7repo_gpgcheck=0enabled=1
[[email protected] ~]# yum clean all[[email protected] ~]# yum makecache

Upgrade Package:
[[email protected] ~]# yum -y upgrade

To install the OpenStack client:
[[email protected] ~]# yum -y install python-openstackclient

Install Openstack-selinux:
[[email protected] ~]# yum -y install openstack-selinux

5. Install MARIADB:
[[email protected] ~]# yum -y install mariadb mariadb-server python2-PyMySQL

To edit the mariadb configuration file:

[[email protected] ~]# mv /etc/my.cnf /etc/my.cnf.bak[[email protected] ~]# cp /usr/share/mariadb/my-large.cnf /etc/my.cnf
[[email protected] ~]# vim /etc/my.cnf.d/openstack.cnf[mysqld]bind-address = 192.168.254.10default-storage-engine = innodbinnodb_file_per_table = onmax_connections = 4096collation-server = utf8_general_cicharacter-set-server = utf8

To start the MARIADB service:

[[email protected] ~]# systemctl enable mariadb.service[[email protected] ~]# systemctl start mariadb.service

Initialize MARIADB:
[[email protected] ~]# mysql_secure_installation(Follow the instructions to set the root password)

6. Install Rabbitmq-server:
[[email protected] ~]# yum install rabbitmq-server

To start the Rabbitmq-server service:

[[email protected] ~]# vim /etc/rabbitmq/rabbitmq.config[[email protected] ~]# systemctl start rabbitmq-server.service

Add OpenStack Users:

[[email protected] ~]# rabbitmqctl add_user openstack openstack[[email protected] ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"

To open the Web management plug-in:
[[email protected] ~]# rabbitmq-plugins enable rabbitmq_management

Using Web Access Rabbitmq-server (default account guest, password Guest):

Set OpenStack user tags to administrator (click Admin-OpenStack):

Click Update this User:

To view the settings:

7. Install memcached:
[[email protected] ~]# yum -y install memcached python-memcached

Configuration memcached:

[[email protected] ~]# vim /etc/sysconfig/memcachedPORT="11211"USER="memcached"MAXCONN="1024"CACHESIZE="64"OPTIONS="-l 0.0.0.0,::1"

To start the memcached service:

[[email protected] ~]# systemctl enable memcached.service[[email protected] ~]# systemctl start memcached.service

8. Install the ETCD service:
[[email protected] ~]# yum -y install etcd

To configure the ETCD service:

[[email protected] ~]# vim /etc/etcd/etcd.conf#[Member]ETCD_DATA_DIR="/var/lib/etcd/default.etcd"ETCD_LISTEN_PEER_URLS="http://192.168.254.10:2380"ETCD_LISTEN_CLIENT_URLS="http://192.168.254.10:2379"ETCD_NAME="openstack-server"#[Clustering]ETCD_INITIAL_ADVERTISE_PEER_URLS="http://192.168.254.10:2380"ETCD_ADVERTISE_CLIENT_URLS="http://192.168.254.10:2379"ETCD_INITIAL_CLUSTER="openstack=http://192.168.254.10:2380"ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-01"ETCD_INITIAL_CLUSTER_STATE="new"

To start the ETCD service:

[[email protected] ~]# systemctl enable etcd[[email protected] ~]# systemctl start etcd

9. Install Keystone:
Create Keystone libraries and users in MARIADB:

[[email protected] ~]# mysql -uroot -psmoke520 -e "CREATE DATABASE keystone;"[[email protected] ~]# mysql -uroot -psmoke520 -e "GRANT ALL PRIVILEGES ON keystone.* TO ‘keystone‘@‘localhost‘ IDENTIFIED BY ‘keystone‘;"[[email protected] ~]# mysql -uroot -psmoke520 -e "GRANT ALL PRIVILEGES ON keystone.* TO ‘keystone‘@‘%‘ IDENTIFIED BY ‘keystone‘;"

Install Keystone:
[[email protected] ~]# yum -y install openstack-keystone httpd mod_wsgi

To modify the Keystone configuration file:

[[email protected] ~]# vim /etc/keystone/keystone.conf[database]connection = mysql+pymysql://keystone:[email protected]/keystone[token]provider = fernet

To synchronize the database:
[[email protected] ~]# su -s /bin/sh -c "keystone-manage db_sync" keystone

Initialize the Fernet key repository:

[[email protected] ~]# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone[[email protected] ~]# keystone-manage credential_setup --keystone-user keystone --keystone-group keystone

Boot Identity Service:

[[email protected] ~]# keystone-manage bootstrap --bootstrap-password admin > --bootstrap-admin-url http://openstack-server:5000/v3/ > --bootstrap-internal-url http://openstack-server:5000/v3/ > --bootstrap-public-url http://openstack-server:5000/v3/ > --bootstrap-region-id RegionOne

To configure the HTTPD service:

[[email protected] ~]# vim /etc/httpd/conf/httpd.confServerName openstack-server

To create a Wsgi-keysone profile link:
[[email protected] ~]# ln -s /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.d/

To start the HTTPD service:

[[email protected] ~]# systemctl enable httpd.service[[email protected] ~]# systemctl start httpd.service
[[email protected] ~]# vim admin-openrc.shexport OS_USERNAME=adminexport OS_PASSWORD=adminexport OS_PROJECT_NAME=adminexport OS_USER_DOMAIN_NAME=Defaultexport OS_PROJECT_DOMAIN_NAME=Defaultexport OS_AUTH_URL=http://openstack-server:5000/v3export OS_IDENTITY_API_VERSION=3

Create domain, project, user, role:

[[email protected] ~]# openstack domain create --description "An Example Domain" example[[email protected] ~]# openstack project create --domain default > --description "Service Project" service[[email protected] ~]# openstack project create --domain default > --description "Demo Project" myproject[[email protected] ~]# openstack user create --domain default > --password-prompt myuser[[email protected] ~]# openstack role create myrole[[email protected] ~]# openstack role add --project myproject --user myuser myrole

Verify that the Keystone is installed successfully:

[[email protected] ~]# unset OS_AUTH_URL OS_PASSWORD[[email protected] ~]# openstack --os-auth-url http://openstack-server:5000/v3 --os-project-domain-name Default --os-user-domain-nam e Default --os-project-name admin --os-username admin token issue

To create a myuser environment variable:

[[email protected] ~]# vim myuser-openrc.shexport OS_USERNAME=myuserexport OS_PASSWORD=myuserexport OS_PROJECT_NAME=myprojectexport OS_USER_DOMAIN_NAME=Defaultexport OS_PROJECT_DOMAIN_NAME=Defaultexport OS_AUTH_URL=http://openstack-server:5000/v3export OS_IDENTITY_API_VERSION=3

To test with MyUser users:

[[email protected] ~]# openstack --os-auth-url http://openstack-server:5000/v3 > --os-project-domain-name Default --os-user-domain-name Default > --os-project-name myproject --os-username myuser token issue

To modify the user environment variable script:

[[email protected] ~]# vim admin-openrc.shexport OS_USERNAME=adminexport OS_PASSWORD=adminexport OS_PROJECT_NAME=adminexport OS_USER_DOMAIN_NAME=Defaultexport OS_PROJECT_DOMAIN_NAME=Defaultexport OS_AUTH_URL=http://openstack-server:5000/v3export OS_IDENTITY_API_VERSION=3export OS_IMAGE_API_VERSION=2
[[email protected] ~]# vim myuser-openrc.shexport OS_USERNAME=myuserexport OS_PASSWORD=myuserexport OS_PROJECT_NAME=myprojectexport OS_USER_DOMAIN_NAME=Defaultexport OS_PROJECT_DOMAIN_NAME=Defaultexport OS_AUTH_URL=http://openstack-server:5000/v3export OS_IDENTITY_API_VERSION=3export OS_IMAGE_API_VERSION=2

To use a script test:

[[email protected] ~]# . admin-openrc.sh[[email protected] ~]# openstack token issue

Openstack-rocky Edition Standalone Deployment

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.