openstack之基礎環境準備(L版)

來源:互聯網
上載者:User

標籤:虛擬化 雲端運算 openstack kvm

centos7.1   openstack L版本,環境規劃如下

[[email protected] ~]# ansible web -a ‘hostname‘172.16.80.131 | SUCCESS | rc=0 >>computer1172.16.80.130 | SUCCESS | rc=0 >>controller[[email protected] ~]# ansible web -a ‘cat /etc/hosts‘172.16.80.131 | SUCCESS | rc=0 >>127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4::1         localhost localhost.localdomain localhost6 localhost6.localdomain6172.16.80.130 controller172.16.80.131 computer1172.16.80.130 | SUCCESS | rc=0 >>127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4::1         localhost localhost.localdomain localhost6 localhost6.localdomain6172.16.80.130 controller172.16.80.131 computer1


1、配置時間同步

[[email protected] ~]# ansible web -a ‘yum install chrony -y‘


在controller上面修改

[[email protected] ~]# vim /etc/chrony.conf 

allow 172.16.80.0/24


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

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

[[email protected] ~]# ansible web -a ‘date‘

172.16.80.130 | SUCCESS | rc=0 >>

Sat Oct 29 21:31:36 CST 2016


172.16.80.131 | SUCCESS | rc=0 >>

Sat Oct 29 21:31:36 CST 2016


[[email protected] ~]# ansible web -a ‘timedatectl set-timezone Asia/Shanghai‘ 設定時區


2、安裝openstack源

[[email protected] ~]# yum install centos-release-openstack-liberty -y

[[email protected] ~]# yum install https://rdoproject.org/repos/openstack-liberty/rdo-release-liberty.rpm -y


3、安裝資料庫並配置

[[email protected] ~]# yum install mariadb mariadb-server MySQL-python -y

[[email protected] ~]# vim /etc/my.cnf

[mysqld]

default-storage-engine = innodb

innodb_file_per_table

collation-server = utf8_general_ci

init-connect = ‘SET NAMES utf8‘

character-set-server = utf8


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

Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

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


4、建立資料庫及授權

MariaDB [(none)]> CREATE DATABASE keystone;Query OK, 1 row affected (0.00 sec)MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO ‘keystone‘@‘localhost‘ IDENTIFIED BY ‘keystone‘;Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO ‘keystone‘@‘%‘ IDENTIFIED BY ‘keystone‘;Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> CREATE DATABASE glance;Query OK, 1 row affected (0.00 sec)MariaDB [(none)]> GRANT ALL PRIVILEGES ON glance.* TO ‘glance‘@‘localhost‘ IDENTIFIED BY ‘glance‘;Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> GRANT ALL PRIVILEGES ON glance.* TO ‘glance‘@‘%‘ IDENTIFIED BY ‘glance‘;Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> CREATE DATABASE nova;Query OK, 1 row affected (0.00 sec)MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO ‘nova‘@‘localhost‘ IDENTIFIED BY ‘nova‘;Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO ‘nova‘@‘%‘ IDENTIFIED BY ‘nova‘;Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> CREATE DATABASE neutron;Query OK, 1 row affected (0.00 sec)MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO ‘neutron‘@‘localhost‘ IDENTIFIED BY ‘neutron‘;Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO ‘neutron‘@‘%‘ IDENTIFIED BY ‘neutron‘;Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> CREATE DATABASE cinder;Query OK, 1 row affected (0.00 sec)MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO ‘cinder‘@‘localhost‘ IDENTIFIED BY ‘cinder‘;Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO ‘cinder‘@‘%‘ IDENTIFIED BY ‘cinder‘;Query OK, 0 rows affected (0.00 sec)


5、安裝訊息佇列,添加使用者授權

[[email protected] ~]# yum install rabbitmq-server -y


[[email protected] ~]# systemctl enable rabbitmq-server.service

Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service.

[[email protected] ~]# systemctl start rabbitmq-server.service

[[email protected] ~]# rabbitmqctl add_user openstack openstack

Creating user "openstack" ...

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

Setting permissions for user "openstack" in vhost "/" ...


[[email protected] ~]# rabbitmq-plugins list

 Configured: E = explicitly enabled; e = implicitly enabled

 | Status:   [failed to contact [email protected] - status not shown]

 |/

[  ] amqp_client                       3.6.5

[  ] cowboy                            1.0.3

[  ] cowlib                            1.0.1

[  ] mochiweb                          2.13.1

[  ] rabbitmq_amqp1_0                  3.6.5

[  ] rabbitmq_auth_backend_ldap        3.6.5

[  ] rabbitmq_auth_mechanism_ssl       3.6.5

[  ] rabbitmq_consistent_hash_exchange 3.6.5

[  ] rabbitmq_event_exchange           3.6.5

[  ] rabbitmq_federation               3.6.5

[  ] rabbitmq_federation_management    3.6.5

[  ] rabbitmq_jms_topic_exchange       3.6.5

[  ] rabbitmq_management               3.6.5

[  ] rabbitmq_management_agent         3.6.5

[  ] rabbitmq_management_visualiser    3.6.5

[  ] rabbitmq_mqtt                     3.6.5

[  ] rabbitmq_recent_history_exchange  1.2.1

[  ] rabbitmq_sharding                 0.1.0

[  ] rabbitmq_shovel                   3.6.5

[  ] rabbitmq_shovel_management        3.6.5

[  ] rabbitmq_stomp                    3.6.5

[  ] rabbitmq_top                      3.6.5

[  ] rabbitmq_tracing                  3.6.5

[  ] rabbitmq_trust_store              3.6.5

[  ] rabbitmq_web_dispatch             3.6.5

[  ] rabbitmq_web_stomp                3.6.5

[  ] rabbitmq_web_stomp_examples       3.6.5

[  ] sockjs                            0.3.4

[  ] webmachine                        1.10.3


[[email protected] ~]# rabbitmq-plugins enable rabbitmq_management

The following plugins have been enabled:

  mochiweb

  webmachine

  rabbitmq_web_dispatch

  amqp_client

  rabbitmq_management_agent

  rabbitmq_management


Applying plugin configuration to [email protected] started 6 plugins.


[[email protected] ~]# systemctl restart rabbitmq-server.service

[[email protected] ~]# netstat -lntup |grep 5672

650) this.width=650;" src="http://s4.51cto.com/wyfs02/M00/89/7B/wKiom1gUusbiqsg1AAA4tQrwl1o169.png" title="1.png" alt="wKiom1gUusbiqsg1AAA4tQrwl1o169.png" />


訪問測試http://172.16.80.130:15672/  預設使用者名密碼  guest/guest

650) this.width=650;" src="http://s1.51cto.com/wyfs02/M01/89/79/wKioL1gUuV3AjRkmAAEyyNU8kok800.png" title="1.png" alt="wKioL1gUuV3AjRkmAAEyyNU8kok800.png" />

role設定為administrator,並設定openstack的密碼 

650) this.width=650;" src="http://s4.51cto.com/wyfs02/M02/89/79/wKioL1gUupiAhcVHAADHyRQrwrY680.png" title="1.png" alt="wKioL1gUupiAhcVHAADHyRQrwrY680.png" />

本文出自 “厚德載物” 部落格,謝絕轉載!

openstack之基礎環境準備(L版)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.