Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Openstack O version installs keystone, memcached, httpd services

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Install keystone, memcached, httpd services

[root@controller ~] # yum-y install openstack-keystone httpd mod_wsgi python-openstackclient memcached python-memcached openstack-utils

[root@controller ~] # systemctl enable memcached.service

[root@controller ~] # systemctl start memcached.service

[root@controller ~] # systemctl status memcached.service

[root@controller ~] # netstat-anpult | grep memcached

1. Modify mamcached service profile

[root@controller ~] # cat / etc/sysconfig/memcached

PORT= "11211"

USER= "memcached"

MAXCONN= "1024"

CACHESIZE= "64"

OPTIONS= "- l 127.0.0.1 Magazine 1192.168.0.111"

Modify the configuration file of the keystone service

[root@controller ~] # cp / etc/keystone/keystone.conf / etc/keystone/keystone.conf.bak

[root@controller ~] # > / etc/keystone/keystone.conf

[root@controller ~] # cat / etc/keystone/keystone.conf

[DEFAULT]

Transport_url = rabbit://openstack:devops@controller

[database]

Connection = mysql+pymysql://keystone:devops@controller/keystone

[cache]

Backend = oslo_cache.memcache_pool

Enabled = true

Memcache_servers = controller:11211

[memcache]

Servers = controller:11211

[token]

Expiration = 3600

Provider = fernet

two。 Configure the httpd service

[root@controller ~] # vi / etc/httpd/conf/httpd.conf

95 ServerName controller

[root@controller] # ln-s / usr/share/keystone/wsgi-keystone.conf / etc/httpd/conf.d/

[root@controller ~] # systemctl enable httpd.service

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

[root@controller ~] # systemctl start httpd.service

[root@controller ~] # systemctl status httpd.service

[root@controller ~] # systemctl list-unit-files | grep httpd.service

3. Create database tables and use commands to synchronize

[root@controller] # su-s / bin/sh-c "keystone-manage db_sync" keystone

[root@controller ~] # mysql-hcontroller-ukeystone-pdevops database check table

Welcome to the MariaDB monitor. Commands end with; or\ g.

Your MariaDB connection id is 15

Server version: 10.1.20-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.

MariaDB [(none)] >

Initialization

[root@controller] # keystone-manage fernet_setup-- keystone-user keystone--keystone-group keystone

[root@controller] # keystone-manage credential_setup-- keystone-user keystone--keystone-group keystone

Guide identity service

[root@controller ~] # keystone-manage bootstrap\

-- bootstrap-password devops\

-- bootstrap-username admin\

-- bootstrap-project-name admin\

-- bootstrap-role-name admin\

-- bootstrap-service-name keystone\

-- bootstrap-region-id RegionOne\

-- bootstrap-admin-url http://controller:35357/v3\

-- bootstrap-internal-url http://controller:35357/v3\

-- bootstrap-public-url http://controller:5000/v3

Verify:

[root@controller] # openstack project list-os-username admin-os-project-name admin-os-user-domain-id default-os-project-domain-id default-os-identity-api-version 3-os-auth-url http://controller:5000-os-password devops

+-+ +

| | ID | Name |

+-+ +

| | 5315fe00d937450bb1f136aeb02b38e1 | admin |

+-+ +

4. Create the admin user environment variable, create the / root/admin-openrc file, and write the following:

[root@controller ~] # cat / root/admin-openrc

Export OS_USER_DOMAIN_ID=default

Export OS_PROJECT_DOMAIN_ID=default

Export OS_USERNAME=admin

Export OS_PROJECT_NAME=admin

Export OS_PASSWORD=devops

Export OS_IDENTITY_API_VERSION=3

Export OS_IMAGE_API_VERSION=2

Export OS_AUTH_URL= http://controller:35357/v3

5. Create a service project to manage other services using

[root@controller] # openstack project create-- domain default-- description "Service Project" service

+-- +

| | Field | Value |

+-- +

| | description | Service Project |

| | domain_id | default |

| | enabled | True |

| | id | e4fdeb56612d4a4c8ae523a8e8dd64d2 |

| | is_domain | False |

| | name | service |

| | parent_id | default |

+-- +

Create a normal project demo

[root@controller] # openstack project create-- domain default-- description "Demo Project" demo

+-- +

| | Field | Value |

+-- +

| | description | Demo Project |

| | domain_id | default |

| | enabled | True |

| | id | bd5051c0f91a44d98ccd13eb1d0d180e |

| | is_domain | False |

| | name | demo |

| | parent_id | default |

+-- +

Create a normal user demo

[root@controller] # openstack user create-- domain default demo-- password devops

+-- +

| | Field | Value |

+-- +

| | domain_id | default |

| | enabled | True |

| | id | 04137b0ef90d443392896120ac8519d3 |

| | name | demo |

| | options | {} | |

| | password_expires_at | None |

+-- +

Create user roles to assign demo users to user roles

[root@controller ~] # openstack role create user

+-- +

| | Field | Value |

+-- +

| | domain_id | None |

| | id | 201208f262514a63a102ff47effa8cd5 |

| | name | user |

+-- +

[root@controller] # openstack role add-- project demo-- user demo user

Get rid of environmental variables

[root@controller ~] # unset OS_AUTH_URL OSPASSWORD

[root@controller] # openstack-os-auth-url http://controller:35357/v3-os-project-domain-name default-os-user-domain-name default-os-project-name admin-os-username admin token issue-os-password devops

+-+ +

| | Field | Value |

+-+ +

| | expires | 2017-05-04T06:48:17+0000 |

| | id | gAAAAABZCsChgxLzBdT-OeKPYVo7TP1nF4o0PEyOEH7luvvckDA45wDfhd5IbSXK1V9bnJqwQMHaLpekY29GU68xvABw- |

| | BSrLFuCTpF83JLuPknonpDms49KSQTURbV9lEXNm7CxC-qwzOW-kTwRV1wIqys6tAirkT-33AIIbYCZFA-NPdLiUE |

| | project_id | cb0ef8f994df41b2a470e7e0cdd92015 |

| | user_id | 2dfa05385ca040eb9a2ff0259c41ebf5 |

+-+ +

[root@controller] # openstack-os-auth-url http://controller:5000/v3-os-project-domain-name default-os-user-domain-name default-os-project-name demo-os-username demo token issue-os-password devops

+-+ +

| | Field | Value |

+-+ +

| | expires | 2017-05-04T07:17:13+0000 |

| | id | gAAAAABZCsdqy1NtsxXldUEx7xVNNwiuLHbv8nd29OeWW60bGQSD3hudz1mlsv2IMmukoLBvgbvUENy1A4Q- |

| | NRb2eEuPVaDA467EK1HgOd3mduE-T0J0qUwjNdyOYosb3aIme72OAcXEa3LHCxXaB3H3Rq- |

| | rE91NMsmFm3o0e2SfqnTRAQPsquo |

| | project_id | bd5051c0f91a44d98ccd13eb1d0d180e |

| | user_id | 04137b0ef90d443392896120ac8519d3 |

+-+ +

All the configuration files are in Baidu Cloud disk:

Link: https://pan.baidu.com/s/1CnmKkFMTemv199ctgb5Oig

Extraction code: 27om

After copying this content, open the Baidu network disk mobile phone App, which is more convenient to operate.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report