云计算基础设施平台iaas(openstack)超级详细搭建(二十)栈stack操作

本篇博客将介绍openstack中的stack的UI操作
首先把所需文件放到http服务上

[root@controller xiandian]# pwd
/etc/xiandian
[root@controller xiandian]# ls
lb-server.yaml  nginx_flat.yaml  nginx.yaml  openrc.sh
[root@controller xiandian]# cp nginx* /var/www/html/
[root@controller xiandian]# cp lb-server.yaml /var/www/html/
[root@controller xiandian]# 

云计算基础设施平台iaas(openstack)超级详细搭建(二十)栈stack操作_第1张图片

云计算基础设施平台iaas(openstack)超级详细搭建(二十)栈stack操作_第2张图片

云计算基础设施平台iaas(openstack)超级详细搭建(二十)栈stack操作_第3张图片
云计算基础设施平台iaas(openstack)超级详细搭建(二十)栈stack操作_第4张图片

云计算基础设施平台iaas(openstack)超级详细搭建(二十)栈stack操作_第5张图片

下面分别对上图5个选项进行一一作答

1.admin的密码为000000 也就是openstack的密码
2.yum的URL其实就是我们最初在controller节点搭建的http服务地址。作为一个httpd服务器。可以到我们的yum源中去查看

这里要求的是centos的yum源

[root@compute ~]# vi /etc/yum.repos.d/local.repo 
[centos]
name=centos
baseurl=ftp://192.168.1.11/centos
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl=ftp://192.168.1.11/iaas/iaas-repo
gpgcheck=0
enabled=1
~
3.image的name 我们可以使用openstack或者glance基础命令去查看

这里使用的是glance的基础命令

[root@controller html]# glance image-list
+--------------------------------------+-----------+
| ID                                   | Name      |
+--------------------------------------+-----------+
| 35f04fd3-694b-4ac3-9417-f2a61e479ec6 | CentOS7.0 |
| 37fd20a5-9924-417d-9f51-d283251fafca | centos8   |
| 417f7098-6ac9-4d4f-94e7-23e0616d0f7c | mysql-5.6 |
+--------------------------------------+-----------+
4.针对于我们的网络名字,我们可以使用openstack或者是其组件neutron的基础命令去查看

下面我们使用openstack的命令去查看

[root@controller html]# openstack network list
+--------------------------------------+---------+--------------------------------------+
| ID                                   | Name    | Subnets                              |
+--------------------------------------+---------+--------------------------------------+
| 9ccc01f7-9529-400e-a192-e299baf5ba9c | ext_net | 20eb1afc-fa08-4e91-887a-908375794ef7 |
| c2fc035e-bf7e-412c-81c7-4b904fea870b | ins_net | 01655c52-a687-4d29-81df-15b15fa70d88 |
+--------------------------------------+---------+--------------------------------------+
[root@controller html]# 
5 .这里是我们的负载均衡lbaas的ID

我们可以通过openstack的基础命令去查看

[root@controller html]# neutron lb-pool-list
+--------------------------------------+---------------+----------+-------------+----------+----------------+--------+
| id                                   | name          | provider | lb_method   | protocol | admin_state_up | status |
+--------------------------------------+---------------+----------+-------------+----------+----------------+--------+
| a84b45ce-7fcf-4543-b207-2e489fa0722b | resource_pool | haproxy  | ROUND_ROBIN | HTTP     | True           | ACTIVE |
+--------------------------------------+---------------+----------+-------------+----------+----------------+--------+

我们填写完后,之接点击创建就可以了,如下图效果所示
云计算基础设施平台iaas(openstack)超级详细搭建(二十)栈stack操作_第6张图片

云计算基础设施平台iaas(openstack)超级详细搭建(二十)栈stack操作_第7张图片
云计算基础设施平台iaas(openstack)超级详细搭建(二十)栈stack操作_第8张图片

这是栈模板

description: A load-balancer server
heat_template_version: '2014-10-16'
parameters:
  flavor: {default: m1.small, type: string}
  ftp_yum_url: {description: Yum Url, type: string}
  image: {default: centos7, description: Images, type: string}
  network_name: {default: int-net1, description: Int Network, type: string}
  pool_id: {description: LBaas Pool to join, type: string}
  server_name: {default: web_server, description: Server Name, type: string}
resources:
  member:
    properties:
      address:
        get_attr: [server, first_address]
      pool_id: {get_param: pool_id}
      protocol_port: 80
    type: OS::Neutron::PoolMember
  server:
    properties:
      flavor: {get_param: flavor}
      image: {get_param: image}
      name: {get_param: server_name}
      networks:
      - network: {get_param: network_name}
      user_data:
        str_replace:
          params:
            ftp_yum_url: {get_param: ftp_yum_url}
          template: '#!/bin/bash

            mkdir -p /opt/repo

            mv /etc/yum.repos.d/* /opt/repo

            cat > /etc/yum.repos.d/yum.repo <<-EOF

            [centos7]

            name=centos7

            gpgcheck=0

            baseurl=ftp_yum_url

            enabled=1

            EOF


            setenforce 0

            yum clean all


            yum install httpd -y

            systemctl restart httpd

            systemctl enable httpd

            '
      user_data_format: RAW
    type: OS::Nova::Server

云计算基础设施平台iaas(openstack)超级详细搭建(二十)栈stack操作_第9张图片

你可能感兴趣的:(Linux,openstack,云计算)