zhuqibs
作者zhuqibs·2020-04-07 23:36
软件开发工程师·Adidas

devstack 单机安装 ocata 流程

字数 14288阅读 1731评论 0赞 6

准备
1、准备一台vmware虚机,cpu2~3核,内存8g,磁盘20G+,网卡两块,一块host模式(192.168.1.200,当host ip),一块net模式(dhcp,外网访问和secureCRT连接)
2、先行安装mariadb10+版本,密码修改成12345,见《mariadb升级》
3、安装干净的httpd服务,版本2.7以上
4、为了安装顺利,下载所有各组件的包到/opt/stack下
git clone http://git.trystack.cn/openstack/horizon -b stable/ocata
git clone http://git.trystack.cn/openstack/keystone -b stable/ocata
git clone http://git.trystack.cn/openstack/neutron -b stable/ocata
git clone http://git.trystack.cn/openstack/nova -b stable/ocata
git clone http://git.trystack.cn/openstack/cinder -b stable/ocata
git clone http://git.trystack.cn/openstack/swift -b stable/ocata
git clone http://git.trystack.cn/openstack/glance -b stable/ocata

1.selinux、firewalld关闭
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动

2.pip源代理
mkdir -p ~/.pip
vi ~/.pip/pip.conf
[global]
index-url = https://pypi.douban.com/simple/
[install]
trusted-host = pypi.douban.com

3.下载并安装EPEL
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm
yum repolist ##检查是否已添加至源列表

4.安装工具包
yum install -y python-pip
pip install --upgrade pip
pip install -U os-testr
yum -y install bridge-utils
yum -y install net-tools
yum install -y git yum-utils

5.更新系统cd
yum update

6.创建stack用户,下载devstack
useradd stack
passwd stack
git clone https://github.com/openstack-dev/devstack.git -b stable/ocata

7.创建stack用户,并切换至stack用户(devstack默认必须使用stack用户安装)
cd /home/stack/devstack/tools/
./create-stack-user.sh
chown -R stack:stack /home/stack/devstack
chmod 777 /opt/stack -R
su stack

8.创建local.conf
[[local|localrc]]

use TryStack git mirror

GIT_BASE=http://git.trystack.cn
NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
SPICE_REPO=http://git.trystack.cn/spice/spice-html5.git

OFFLINE=True

RECLONE=True

Define images to be automatically downloaded during the DevStack built process

DOWNLOAD_DEFAULT_IMAGES=False

IMAGE_URLS="http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img"

HOST_IP=192.168.1.200

Credentials

DATABASE_PASSWORD=12345
ADMIN_PASSWORD=12345
SERVICE_PASSWORD=12345
SERVICE_TOKEN=12345
RABBIT_PASSWORD=12345
HORIZON_BRANCH=stable/ocata
KEYSTONE_BRANCH=stable/ocata
NOVA_BRANCH=stable/ocata
NEUTRON_BRANCH=stable/ocata
GLANCE_BRANCH=stable/ocata
CINDER_BRANCH=stable/ocata

keystone

KEYSTONE_TOKEN_FORMAT=UUID

Heat

HEAT_BRANCH=stable/ocata
enable_service h-eng h-api h-api-cfn h-api-cw

Swift

SWIFT_BRANCH=stable/ocata
ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account
SWIFT_REPLICAS=1
SWIFT_HASH=011688b44136573e209e

Enabling Neutron (network) Service

disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service q-metering
enable_service neutron

Neutron options

Q_USE_SECGROUP=True
FLOATING_RANGE="192.168.1.0/24"
FIXED_RANGE="10.0.0.0/24"
Q_FLOATING_ALLOCATION_POOL=start=192.168.1.200,end=192.168.1.220
PUBLIC_NETWORK_GATEWAY="192.168.1.1"
Q_L3_ENABLED=True
PUBLIC_INTERFACE=eno16777736
Q_USE_PROVIDERNET_FOR_PUBLIC=True
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_BRIDGE=br-ex
OVS_BRIDGE_MAPPINGS=public:br-ex

VLAN configuration.

Q_PLUGIN=ml2
ENABLE_TENANT_VLANS=True

Logging

LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=True
SCREEN_LOGDIR=/opt/stack/logs

LIBVIRT_TYPE=qemu

enable_service placement-api

enable_service placement-client



2019-01-01 17:23:32.484 | _ summary __
2019-01-01 17:23:32.486 | venv: commands succeeded
2019-01-01 17:23:32.488 | congratulations :)
2019-01-01 17:23:32.557 | ++lib/tempest:configure_tempest:585 is_service_enabled q-metering
2019-01-01 17:23:32.626 | ++functions-common:is_service_enabled:2073 return 0
2019-01-01 17:23:32.638 | ++lib/tempest:configure_tempest:589 DEFAULT_NET_EXT=address-scope,agent,allowed-address-pairs,auto-allocated-topology
2019-01-01 17:23:32.650 | ++lib/tempest:configure_tempest:590 DEFAULT_NET_EXT+=,availability_zone,binding,default-subnetpools,dhcp_agent_scheduler
2019-01-01 17:23:32.664 | ++lib/tempest:configure_tempest:591 DEFAULT_NET_EXT+=,dvr,ext-gw-mode,external-net,extra_dhcp_opt,extraroute,flavors
2019-01-01 17:23:32.676 | ++lib/tempest:configure_tempest:592 DEFAULT_NET_EXT+=,l3-flavors,l3-ha,l3_agent_scheduler,multi-provider,net-mtu
2019-01-01 17:23:32.690 | ++lib/tempest:configure_tempest:593 DEFAULT_NET_EXT+=,network-ip-availability,network_availability_zone,pagination
2019-01-01 17:23:32.701 | ++lib/tempest:configure_tempest:594 DEFAULT_NET_EXT+=,port-security,project-id,provider,quotas,rbac-policies,router
2019-01-01 17:23:32.711 | ++lib/tempest:configure_tempest:595 DEFAULT_NET_EXT+=,router_availability_zone,security-group,service-type,sorting
2019-01-01 17:23:32.721 | ++lib/tempest:configure_tempest:596 DEFAULT_NET_EXT+=,standard-attr-description,standard-attr-revisions,standard-attr-timestamp
2019-01-01 17:23:32.731 | ++lib/tempest:configure_tempest:597 DEFAULT_NET_EXT+=,subnet-service-types,subnet_allocation,tag,tag-ext
2019-01-01 17:23:32.742 | ++lib/tempest:configure_tempest:599 local network_api_extensions=address-scope,agent,allowed-address-pairs,auto-allocated-topology,availability_zone,binding,default-subnetpools,dhcp_agent_scheduler,dvr,ext-gw-mode,external-net,extra_dhcp_opt,extraroute,flavors,l3-flavors,l3-ha,l3_agent_scheduler,multi-provider,net-mtu,network-ip-availability,network_availability_zone,pagination,port-security,project-id,provider,quotas,rbac-policies,router,router_availability_zone,security-group,service-type,sorting,standard-attr-description,standard-attr-revisions,standard-attr-timestamp,subnet-service-types,subnet_allocation,tag,tag-ext
2019-01-01 17:23:32.751 | ++lib/tempest:configure_tempest:600 [[ ! -z '' ]]
2019-01-01 17:23:32.761 | ++lib/tempest:configure_tempest:606 iniset /opt/stack/tempest/etc/tempest.conf network-feature-enabled api_extensions address-scope,agent,allowed-address-pairs,auto-allocated-topology,availability_zone,binding,default-subnetpools,dhcp_agent_scheduler,dvr,ext-gw-mode,external-net,extra_dhcp_opt,extraroute,flavors,l3-flavors,l3-ha,l3_agent_scheduler,multi-provider,net-mtu,network-ip-availability,network_availability_zone,pagination,port-security,project-id,provider,quotas,rbac-policies,router,router_availability_zone,security-group,service-type,sorting,standard-attr-description,standard-attr-revisions,standard-attr-timestamp,subnet-service-types,subnet_allocation,tag,tag-ext
2019-01-01 17:23:32.838 | ++lib/tempest:configure_tempest:608 DEFAULT_SWIFT_OPT=account_quotas,bulk_delete,bulk_upload,container_quotas
2019-01-01 17:23:32.848 | ++lib/tempest:configure_tempest:609 DEFAULT_SWIFT_OPT+=,container_sync,crossdomain,formpost,ratelimit,slo
2019-01-01 17:23:32.859 | ++lib/tempest:configure_tempest:610 DEFAULT_SWIFT_OPT+=,staticweb,tempauth,tempurl,versioned_writes
2019-01-01 17:23:32.876 | ++lib/tempest:configure_tempest:612 local object_storage_api_extensions=account_quotas,bulk_delete,bulk_upload,container_quotas,container_sync,crossdomain,formpost,ratelimit,slo,staticweb,tempauth,tempurl,versioned_writes
2019-01-01 17:23:32.892 | ++lib/tempest:configure_tempest:613 [[ ! -z '' ]]
2019-01-01 17:23:32.907 | ++lib/tempest:configure_tempest:619 iniset /opt/stack/tempest/etc/tempest.conf object-storage-feature-enabled discoverable_apis account_quotas,bulk_delete,bulk_upload,container_quotas,container_sync,crossdomain,formpost,ratelimit,slo,staticweb,tempauth,tempurl,versioned_writes
2019-01-01 17:23:33.005 | ++lib/tempest:configure_tempest:621 DEFAULT_VOL_EXT=OS-SCH-HNT,backups,capabilities,cgsnapshots,consistencygroups
2019-01-01 17:23:33.016 | ++lib/tempest:configure_tempest:622 DEFAULT_VOL_EXT+=,encryption,os-admin-actions,os-availability-zone
2019-01-01 17:23:33.029 | ++lib/tempest:configure_tempest:623 DEFAULT_VOL_EXT+=,os-extended-services,os-extended-snapshot-attributes
2019-01-01 17:23:33.040 | ++lib/tempest:configure_tempest:624 DEFAULT_VOL_EXT+=,os-hosts,os-image-create,os-quota-class-sets,os-quota-sets
2019-01-01 17:23:33.051 | ++lib/tempest:configure_tempest:625 DEFAULT_VOL_EXT+=,os-services,os-snapshot-actions,os-snapshot-manage
2019-01-01 17:23:33.061 | ++lib/tempest:configure_tempest:626 DEFAULT_VOL_EXT+=,os-snapshot-unmanage,os-types-extra-specs,os-types-manage
2019-01-01 17:23:33.074 | ++lib/tempest:configure_tempest:627 DEFAULT_VOL_EXT+=,os-used-limits,os-vol-host-attr,os-vol-image-meta
2019-01-01 17:23:33.084 | ++lib/tempest:configure_tempest:628 DEFAULT_VOL_EXT+=,os-vol-mig-status-attr,os-vol-tenant-attr,os-volume-actions
2019-01-01 17:23:33.094 | ++lib/tempest:configure_tempest:629 DEFAULT_VOL_EXT+=,os-volume-encryption-metadata,os-volume-manage
2019-01-01 17:23:33.112 | ++lib/tempest:configure_tempest:630 DEFAULT_VOL_EXT+=,os-volume-transfer,os-volume-type-access
2019-01-01 17:23:33.128 | ++lib/tempest:configure_tempest:631 DEFAULT_VOL_EXT+=,os-volume-unmanage,qos-specs,scheduler-stats
2019-01-01 17:23:33.147 | ++lib/tempest:configure_tempest:632 local volume_api_extensions=OS-SCH-HNT,backups,capabilities,cgsnapshots,consistencygroups,encryption,os-admin-actions,os-availability-zone,os-extended-services,os-extended-snapshot-attributes,os-hosts,os-image-create,os-quota-class-sets,os-quota-sets,os-services,os-snapshot-actions,os-snapshot-manage,os-snapshot-unmanage,os-types-extra-specs,os-types-manage,os-used-limits,os-vol-host-attr,os-vol-image-meta,os-vol-mig-status-attr,os-vol-tenant-attr,os-volume-actions,os-volume-encryption-metadata,os-volume-manage,os-volume-transfer,os-volume-type-access,os-volume-unmanage,qos-specs,scheduler-stats
2019-01-01 17:23:33.160 | ++lib/tempest:configure_tempest:633 [[ ! -z '' ]]
2019-01-01 17:23:33.172 | ++lib/tempest:configure_tempest:639 iniset /opt/stack/tempest/etc/tempest.conf volume-feature-enabled api_extensions OS-SCH-HNT,backups,capabilities,cgsnapshots,consistencygroups,encryption,os-admin-actions,os-availability-zone,os-extended-services,os-extended-snapshot-attributes,os-hosts,os-image-create,os-quota-class-sets,os-quota-sets,os-services,os-snapshot-actions,os-snapshot-manage,os-snapshot-unmanage,os-types-extra-specs,os-types-manage,os-used-limits,os-vol-host-attr,os-vol-image-meta,os-vol-mig-status-attr,os-vol-tenant-attr,os-volume-actions,os-volume-encryption-metadata,os-volume-manage,os-volume-transfer,os-volume-type-access,os-volume-unmanage,qos-specs,scheduler-stats
2019-01-01 17:23:33.251 | ++lib/tempest:configure_tempest:642 IFS='
2019-01-01 17:23:33.254 | '
2019-01-01 17:23:33.265 | ++extras.d/80-tempest.sh:source:22 echo_summary 'Installing Tempest Plugins'
2019-01-01 17:23:33.276 | ++./stack.sh:echo_summary:416 [[ -t 3 ]]
2019-01-01 17:23:33.287 | ++./stack.sh:echo_summary:416 [[ True != \T\r\u\e ]]
2019-01-01 17:23:33.297 | ++./stack.sh:echo_summary:422 echo -e Installing Tempest Plugins
2019-01-01 17:23:33.308 | ++extras.d/80-tempest.sh:source:23 install_tempest_plugins
2019-01-01 17:23:33.319 | ++lib/tempest:install_tempest_plugins:661 pushd /opt/stack/tempest
2019-01-01 17:23:33.321 | /opt/stack/tempest /opt/stack/tempest
2019-01-01 17:23:33.360 | ++lib/tempest:install_tempest_plugins:662 [[ 0 != 0 ]]
2019-01-01 17:23:33.372 | ++lib/tempest:install_tempest_plugins:667 popd
2019-01-01 17:23:33.374 | /opt/stack/tempest
2019-01-01 17:23:33.383 | ++extras.d/80-tempest.sh:source:26 [[ stack == \u\n\s\t\a\c\k ]]
2019-01-01 17:23:33.394 | ++extras.d/80-tempest.sh:source:31 [[ stack == \c\l\e\a\n ]]
2019-01-01 17:23:33.406 | +functions-common:run_phase:1890 [[ stack == \s\o\u\r\c\e ]]
2019-01-01 17:23:33.416 | +functions-common:run_phase:1893 [[ stack == \o\v\e\r\r\i\d\e\_\d\e\f\a\u\l\t\s ]]
2019-01-01 17:23:33.427 | +functions-common:run_phase:1896 run_plugins stack test-config
2019-01-01 17:23:33.437 | +functions-common:run_plugins:1855 local mode=stack
2019-01-01 17:23:33.447 | +functions-common:run_plugins:1856 local phase=test-config
2019-01-01 17:23:33.456 | +functions-common:run_plugins:1858 local plugins=
2019-01-01 17:23:33.466 | +functions-common:run_plugins:1859 local plugin
2019-01-01 17:23:33.476 | +./stack.sh:main:1436 merge_config_group /home/stack/devstack/local.conf test-config
2019-01-01 17:23:33.486 | +inc/meta-config:merge_config_group:171 local localfile=/home/stack/devstack/local.conf
2019-01-01 17:23:33.495 | +inc/meta-config:merge_config_group:171 shift
2019-01-01 17:23:33.508 | +inc/meta-config:merge_config_group:172 local matchgroups=test-config
2019-01-01 17:23:33.526 | +inc/meta-config:merge_config_group:174 [[ -r /home/stack/devstack/local.conf ]]
2019-01-01 17:23:33.541 | +inc/meta-config:merge_config_group:176 local configfile group
2019-01-01 17:23:33.551 | +inc/meta-config:merge_config_group:177 for group in '$matchgroups'
2019-01-01 17:23:33.568 | ++inc/meta-config:merge_config_group:177 get_meta_section_files /home/stack/devstack/local.conf test-config
2019-01-01 17:23:33.586 | ++inc/meta-config:get_meta_section_files:63 local file=/home/stack/devstack/local.conf
2019-01-01 17:23:33.598 | ++inc/meta-config:get_meta_section_files:64 local matchgroup=test-config
2019-01-01 17:23:33.616 | ++inc/meta-config:get_meta_section_files:66 [[ -r /home/stack/devstack/local.conf ]]
2019-01-01 17:23:33.621 | ++inc/meta-config:get_meta_section_files:68 awk -v matchgroup=test-config '
2019-01-01 17:23:33.623 | /^\[\[.+\|.*\]\]/ {
2019-01-01 17:23:33.624 | gsub("[][]", "", $1);
2019-01-01 17:23:33.626 | split($1, a, "|");
2019-01-01 17:23:33.628 | if (a[1] == matchgroup)
2019-01-01 17:23:33.630 | print a[2]
2019-01-01 17:23:33.631 | }
2019-01-01 17:23:33.632 | ' /home/stack/devstack/local.conf

=========================

DevStack Component Timing

Total runtime 2314

run_process 91
test_with_retry 6
pip_install 316
restart_apache_server 21
wait_for_service 31
yum_install 73

git_timed 2

This is your host IP address: 192.168.1.200
This is your host IPv6 address: ::1
Horizon is now available at http://192.168.1.200/dashboard
Keystone is serving at http://192.168.1.200/identity/
The default users are: admin and demo
The password: 12345
DevStack Version: ocata
Change: d18f37eb0865ad0df45f1a9e041fa8b84fa7ba13 Merge "Remove fping requirement" into stable/ocata 2018-09-28 04:43:15 +0000
OS Version: CentOS 7.6.1810 Core

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

6

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

相关文章

相关问题

相关资料

X社区推广