Joomla! Open Source Content Management

  • 略過到內容
  • 跳到主導覽和登入

導覽觀看搜尋

導覽

搜尋

你目前位置: 首頁

Main Menu

  • 首頁
  • 操作系統
  • 程式設計
  • 網管技術
  • 資料庫 & ERP
  • 應用專題
  • 其它
  • 連結
  • 搜尋
  • 關於本站

首頁

關於本站

  • 列印
  • Email
詳細內容
分類: ROOT
發佈: 2004-08-17, 週二 00:00
作者 Super User
點擊數: 97239

這個網站是Jason的個人網站,主要收發表一些原创技術資料及在網上搜集到的資料。若是在網上搜集到資料,本人一般會注明出處。如有觸及版權等問題,還望原作者見諒和指正及通知本人以便更正有關內容。若需轉載本人的原创技術資料望閣下注明出處。

HPC Clustering quickstart for Centos 6.8 and Clones

  • 列印
  • Email
詳細內容
分類: Cluster
發佈: 2017-12-05, 週二 07:51
作者 Super User
點擊數: 35877

HPC Clustering quickstart for Centos 6.8 and Clones

master 10.0.0.1
node 10.0.0.100~199

yum -y update
yum -y install wget

vi /etc/hosts
10.0.0.1 master
10.0.0.100 node0000
~
10.0.0.199 node0199

/etc/init.d/iptables stop
chkconfig --levels 2345 iptables off
chkconfig --levels 2345 ip6tables off
chkconfig --levels 2345 nfs on

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

yum -y repolist

yum -y install yum-priorities

vi /etc/yum.repos.d/epel.repo
[epel]
priority=10

yum -y check-update

yum -y install autoconf automake openssl-devel elfutils-libelf-devel zlib-static nasm libtool uuid-devel rsync httpd

yum -y install perl-DBI perl-IO-Interface perl-Unix-Syslog perl-Net-ARP perl-CGI perl-Time-HiRes

mkdir /root/perceus
cd /root/perceus
wget http://perceus.org/Perceus/rpms/el65/perceus-1.9.5.el6-2782.x86_64.rpm
wget http://perceus.org/Perceus/rpms/el65/perceus-cgi-1.9.5.el6-2782.x86_64.rpm
wget http://perceus.org/Perceus/rpms/el65/perceus-debuginfo-1.9.5.el6-2782.x86_64.rpm
wget http://perceus.org/Perceus/rpms/el65/perceus-provisiond-1.9.5.el6-2782.x86_64.rpm

rpm -ivh *.rpm

cd /root

vi /etc/perceus/perceus.conf
master network device = eth0
vnfs transfer master = 10.0.0.1

vi /etc/perceus/defaults.conf
Node Name = node####
Vnfs Name = centos-6-1.x86_64
First Node = 1


perceus init

Do you wish to have Perceus do a complete system initialization (yes/no)? yes

What IP address should the node boot address range start at?
(192.168.10.192)> 10.0.0.100

What IP address should the node boot address range end at?
(192.168.10.254)> 10.0.0.199

What domain name should be appended to the DNS records for each entry in DNS?
This won't require you to specify the domain for DNS lookups, but it prevents
conflicts from other non-local hostnames.
(smc-multimedia.com)>

What device should the booting node direct its console output to? Typically
this would be set to 'tty0' unless you are monitoring your nodes over the
serial port. A typical serial port option might be 'ttyS0,115200'.
note: This is a global option which will affect all booting nodes.
(tty0)>
Creating Perceus ssh keys
Generating public/private dsa key pair.
Your identification has been saved in /root/.ssh/perceus.
Your public key has been saved in /root/.ssh/perceus.pub.
The key fingerprint is:
0e:08:4d:47:6b:2e:9c:5e:0a:b6:5a:e5:b4:92:31:ef Email住址會使用灌水程式保護機制。你需要啟動Javascript才能觀看它
The key's randomart image is:
+--[ DSA 1024]----+
|    ..o          |
|   o . .         |
|  . . o          |
|   o =           |
|  = B + S        |
| . % = o         |
|  = *   .        |
| o o             |
|.   E            |
+-----------------+
Created Perceus ssh host keys
Created Perceus ssh rsa host keys
Created Perceus ssh dsa host keys

Perceus is now ready to begin provisioning your cluster!
(/etc/perceus/dnsmasq.conf)

/etc/init.d/perceus restart
chkconfig --levels 2345 perceus on


wget http://perceus.org/Perceus/vnfs/centos-6-1.x86_64.vnfs

perceus vnfs import centos-6-1.x86_64.vnfs


perceus node add 00:30:48:9e:71:30
(/etc/perceus/ethers)

perceus node set vnfs centos-6-1.x86_64 node0001


You could also add the capsule to the default VNFS assignment in /etc/perceus/defaults.conf.

Powering on nodes connected to the Perceus master network will now provision them with the assigned VNFS capsule. If you need to alter the VNFS capsule, mount it with:
# perceus vnfs mount <capsule>

Chroot to the mounted directory and make changes, or use 'yum --installroot' or 'rpm --root' flags to install binaries. When finished finalize changes and recompress the VNFS capsule:
# perceus vnfs umount <capsule>

perceus vnfs mount centos-6-1.x86_64
yum --installroot /mnt/centos-6-1.x86_64 -y install yum
chroot /mnt/centos-6-1.x86_64
yum -y update
yum -y groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts" "General Purpose Desktop"
chkconfig --levels 2345 iptables off
chkconfig --levels 2345 ip6tables off
chkconfig --levels 2345 exim off
chkconfig --levels 2345 firstboot off
yum -y install infiniband-diags perftest qperf opensm
chkconfig --levels 2345 rdma on
exit
perceus vnfs umount centos-6-1.x86_64

Install OpenStack on a bare machine using TripleO Quickstart

  • 列印
  • Email
詳細內容
分類: Cloud
發佈: 2018-06-06, 週三 07:53
作者 Super User
點擊數: 47934

Installation director(MinimalCD --> UTC)[CPU:2X12=24CPUS, RAM:64G, Harddisk:1000G]

director(loing as root):

yum -y update

systemctl disable firewalld
systemctl stop firewalld
systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network

yum install -y net-tools
yum install -y ntpdate

/usr/sbin/ntpdate -s stdtime.gov.hk
/usr/sbin/hwclock --systohc

echo "LANG=en_US.utf-8" > /etc/environment
echo "LC_ALL=en_US.utf-8" >> /etc/environment

echo "192.168.1.113 director.jason-tang.com director" >> /etc/hosts

echo "director.jason-tang.com" > /etc/hostname

/usr/bin/sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

reboot

director(loing as root):
ssh-keygen
export VIRTHOST=127.0.0.2
ssh-copy-id root@$VIRTHOST
ssh root@$VIRTHOST uname -a

curl -O https://raw.githubusercontent.com/openstack/tripleo-quickstart/master/quickstart.sh

vi /root/quickstart.sh
add a line as below:
/usr/bin/sed -i 's/deploy_timeout: 90/deploy_timeout: 120/g' /root/.quickstart/usr/local/share/ansible/roles/overcloud-deploy/defaults/main.yml

after the line as below:
echo "Current run is logged in _quickstart.log file in current directory"

bash quickstart.sh --install-deps

bash quickstart.sh -R pike -c /root/.quickstart/config/general_config/pacemaker.yml -N /root/.quickstart/config/nodes/3ctlr_3comp.yml --tags all $VIRTHOST

......

##################################
Virtual Environment Setup Complete
##################################

Access the undercloud by:

    ssh -F /root/.quickstart/ssh.config.ansible undercloud

Follow the documentation in the link below to complete your deployment.

    http://ow.ly/c44w304begR

##################################
Virtual Environment Setup Complete
##################################



director(loing as root):
ssh -F /root/.quickstart/ssh.config.ansible undercloud

sudo hiera admin_password
c15a069b0e6b20ef8182ecf8da1e665cad9224b3

Google Chrome:(https://192.168.1.113 in this case)
https://director's IP
admin
c15a069b0e6b20ef8182ecf8da1e665cad9224b3


Overcloud information:
Overcloud IP address: 10.0.0.5
Username: admin
Password: rxZsDaGZetVcgwuD9e6wu7EMh


Start all of the Undercloud and Overclouds after reboot director:
director(loing as root):
echo 'su - stack -c "virsh start undercloud"' > /root/start_undercloud_overclouds
echo 'sleep 30' >> /root/start_undercloud_overclouds
echo 'su - stack -c "virsh start control_0"' >> /root/start_undercloud_overclouds
echo 'sleep 30' >> /root/start_undercloud_overclouds
echo 'su - stack -c "virsh start control_1"' >> /root/start_undercloud_overclouds
echo 'sleep 30' >> /root/start_undercloud_overclouds
echo 'su - stack -c "virsh start control_2"' >> /root/start_undercloud_overclouds
echo 'sleep 30' >> /root/start_undercloud_overclouds
echo 'su - stack -c "virsh start compute_0"' >> /root/start_undercloud_overclouds
echo 'sleep 30' >> /root/start_undercloud_overclouds
echo 'su - stack -c "virsh start compute_1"' >> /root/start_undercloud_overclouds
echo 'sleep 30' >> /root/start_undercloud_overclouds
echo 'su - stack -c "virsh start compute_2"' >> /root/start_undercloud_overclouds

chmod +x /root/start_undercloud_overclouds

/root/start_undercloud_overclouds

Install OpenStack on 7 bare machines using TripleO Quickstart(1 Undercloud+3 Controllers+3 Computes)

  • 列印
  • Email
詳細內容
分類: Cloud
發佈: 2018-06-21, 週四 07:36
作者 Super User
點擊數: 28945

Installation undercloud(MinimalCD --> UTC)[CPU:2X12=24CPUS, RAM:64G, Harddisk:2230G]

undercloud(loing as root):
yum -y update
reboot

undercloud(loing as root):
yum install -y yum-utils.noarch
yum install -y deltarpm
yum install -y net-tools
yum install -y ntpdate

/usr/sbin/ntpdate -s stdtime.gov.hk
/usr/sbin/hwclock --systohc

echo "LANG=en_US.utf-8" >> /etc/environment
echo "LC_ALL=en_US.utf-8" >> /etc/environment

systemctl disable firewalld
systemctl stop firewalld
systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network

echo "192.168.1.50 undercloud.smc.com.hk undercloud" >> /etc/hosts

/usr/bin/sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config

echo "undercloud.smc.com.hk" > /etc/hostname
reboot


undercloud(loing as root):
ssh-keygen
export VIRTHOST=127.0.0.2
ssh-copy-id root@$VIRTHOST
ssh root@$VIRTHOST uname -a

curl -O https://raw.githubusercontent.com/openstack/tripleo-quickstart/master/quickstart.sh

vi /root/quickstart.sh
add a line as below:
/usr/bin/sed -i 's/90/120/g' /root/.quickstart/usr/local/share/ansible/roles/overcloud-deploy/defaults/main.yml

after the line as below:
echo "Current run is logged in _quickstart.log file in current directory"

bash quickstart.sh --install-deps

vi /root/config.yml
# Type of undercloud (we're deploying on baremetal otherwise this should be
# virtual)
undercloud_type: baremetal

# Specify the secondary net interface for overcloud provisioning
undercloud_local_interface: eno2

# Specify the external network for undercloud that will be used to route
# overcloud traffic
undercloud_external_network_cidr: 10.0.0.0/24

# Declare the additional interface on undercloud to route overcloud traffic
undercloud_networks:
  external:
    address: 10.0.0.1
    netmask: 255.255.255.0
    device_type: ovs
    type: OVSIntPort
    ovs_bridge: br-ctlplane
    ovs_options: '"tag=10"'
    tag: 10

# Define all the flavors
flavor_map:
  control: control
  compute: compute
  ceph: ceph-storage
  blockstorage: block-storage
  block: block-storage
  objectstorage: swift-storage
  swift: swift-storage

# Will be used by baremetal-undercloud role
step_provide_undercloud: true
# Will be used by baremetal-prep-overcloud role
step_install_upstream_ipxe: true
# Will be used by overcloud-prep-images role
step_introspect: true

# Explicitly declare kvm since we are on BM and disable vBMC
libvirt_type: kvm
libvirt_args: "--libvirt-type kvm"
enable_vbmc: false

#step_provide_undercloud: false
# Environment specific variables
baremetal_provisioning_script: "/root/undercloud-provisioning.sh"
baremetal_network_environment: "/root/network-environment.yaml"
baremetal_instackenv: "/root/instackenv.json"
baremetal_nic_configs: "/root/nic-configs"

# Public (Floating) network definition
floating_ip_cidr: "192.168.24.0/24"
public_net_pool_start: "192.168.24.200"
public_net_pool_end: "192.168.24.250"
public_net_gateway: "192.168.24.1"

extra_args: "--ntp-server pool.ntp.org --control-scale 3 --compute-scale 3 --ceph-storage-scale 0 --block-storage-scale 0 --swift-storage-scale 0 -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml"


vi /root/undercloud-provisioning.sh
#!/bin/bash

chmod +x /root/undercloud-provisioning.sh


vi /root/network-environment.yaml
resource_registry:
  OS::TripleO::BlockStorage::Net::SoftwareConfig: nic-configs/cinder-storage.yaml
  OS::TripleO::Compute::Net::SoftwareConfig: nic-configs/compute.yaml
  OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml
  OS::TripleO::ObjectStorage::Net::SoftwareConfig: nic-configs/swift-storage.yaml
  OS::TripleO::CephStorage::Net::SoftwareConfig: nic-configs/ceph-storage.yaml

parameter_defaults:
  ControlPlaneSubnetCidr: '24'
  ControlPlaneDefaultRoute: 192.168.24.1
  EC2MetadataIp: 192.168.24.1
  ExternalNetCidr: 10.0.0.0/24
  ExternalAllocationPools: [{"start": "10.0.0.2", "end": "10.0.0.19"}]
  ExternalInterfaceDefaultRoute: 10.0.0.1
  PublicVirtualFixedIPs: [{ "ip_address": "10.0.0.20" }]
  NeutronExternalNetworkBridge: "''"
  DnsServers: ["8.8.8.8", "8.8.4.4"]


vi /root/instackenv.json
{
  "nodes": [
      {
         "name": "control-1",
         "pm_type": "ipmi",
         "mac": [
             "00:25:90:e9:0b:8c"
         ],
         "cpu": "24",
         "memory": "65536",
         "disk": "2396",
         "arch": "x86_64",
         "pm_user": "ADMIN",
         "pm_password": "ADMIN",
         "pm_addr": "192.168.24.41",
         "capabilities": "profile:control,boot_option:local"
      },
      {
         "name": "control-2",
         "pm_type": "ipmi",
         "mac": [
             "00:25:90:ef:eb:58"
         ],
         "cpu": "24",
         "memory": "65536",
         "disk": "2396",
         "arch": "x86_64",
         "pm_user": "ADMIN",
         "pm_password": "ADMIN",
         "pm_addr": "192.168.24.42",
         "capabilities": "profile:control,boot_option:local"
      },
      {
         "name": "control-3",
         "pm_type": "ipmi",
         "mac": [
             "00:25:90:e7:28:18"
         ],
         "cpu": "24",
         "memory": "65536",
         "disk": "2396",
         "arch": "x86_64",
         "pm_user": "ADMIN",
         "pm_password": "ADMIN",
         "pm_addr": "192.168.24.43",
         "capabilities": "profile:control,boot_option:local"
      },
      {
         "name": "compute-1",
         "pm_type": "ipmi",
         "mac": [
             "0c:c4:7a:13:80:54"
         ],
         "cpu": "24",
         "memory": "65536",
         "disk": "2396",
         "arch": "x86_64",
         "pm_user": "ADMIN",
         "pm_password": "ADMIN",
         "pm_addr": "192.168.24.44",
         "capabilities": "profile:compute,boot_option:local"
      },
      {
         "name": "compute-2",
         "pm_type": "ipmi",
         "mac": [
             "0c:c4:7a:13:82:80"
         ],
         "cpu": "24",
         "memory": "65536",
         "disk": "2396",
         "arch": "x86_64",
         "pm_user": "ADMIN",
         "pm_password": "ADMIN",
         "pm_addr": "192.168.24.45",
         "capabilities": "profile:compute,boot_option:local"
      },
      {
         "name": "compute-3",
         "pm_type": "ipmi",
         "mac": [
             "0c:c4:7a:12:ae:a4"
         ],
         "cpu": "24",
         "memory": "65536",
         "disk": "2396",
         "arch": "x86_64",
         "pm_user": "ADMIN",
         "pm_password": "ADMIN",
         "pm_addr": "192.168.24.46",
         "capabilities": "profile:compute,boot_option:local"
      }
  ]
}


mkdir /root/nic-configs

vi /root/nic-configs/controller.yaml
heat_template_version: pike

parameters:
  ControlPlaneIp:
    default: ''
    description: IP address/subnet on the ctlplane network
    type: string
  ExternalIpSubnet:
    default: ''
    description: IP address/subnet on the external network
    type: string
  InternalApiIpSubnet:
    default: ''
    description: IP address/subnet on the internal_api network
    type: string
  StorageIpSubnet:
    default: ''
    description: IP address/subnet on the storage network
    type: string
  StorageMgmtIpSubnet:
    default: ''
    description: IP address/subnet on the storage_mgmt network
    type: string
  TenantIpSubnet:
    default: ''
    description: IP address/subnet on the tenant network
    type: string
  ManagementIpSubnet: # Only populated when including environments/network-management.yaml
    default: ''
    description: IP address/subnet on the management network
    type: string
  BondInterfaceOvsOptions:
    default: 'bond_mode=active-backup'
    description: The ovs_options string for the bond interface. Set things like
                 lacp=active and/or bond_mode=balance-slb using this option.
    type: string
  ExternalNetworkVlanID:
    default: 10
    description: Vlan ID for the external network traffic.
    type: number
  InternalApiNetworkVlanID:
    default: 20
    description: Vlan ID for the internal_api network traffic.
    type: number
  StorageNetworkVlanID:
    default: 30
    description: Vlan ID for the storage network traffic.
    type: number
  StorageMgmtNetworkVlanID:
    default: 40
    description: Vlan ID for the storage_mgmt network traffic.
    type: number
  TenantNetworkVlanID:
    default: 50
    description: Vlan ID for the tenant network traffic.
    type: number
  ManagementNetworkVlanID:
    default: 60
    description: Vlan ID for the management network traffic.
    type: number
  ExternalInterfaceDefaultRoute:
    default: '10.0.0.1'
    description: default route for the external network
    type: string
  ControlPlaneSubnetCidr: # Override this via parameter_defaults
    default: '24'
    description: The subnet CIDR of the control plane network.
    type: string
  ControlPlaneDefaultRoute: # Override this via parameter_defaults
    description: The default route of the control plane network.
    type: string
  DnsServers: # Override this via parameter_defaults
    default: []
    description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
    type: comma_delimited_list
  EC2MetadataIp: # Override this via parameter_defaults
    description: The IP address of the EC2 metadata server.
    type: string

resources:
  OsNetConfigImpl:
    type: OS::Heat::SoftwareConfig
    properties:
      group: script
      config:
        str_replace:
          template:
            get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
          params:
            $network_config:
              network_config:
              - type: ovs_bridge
                name: br-ex
                use_dhcp: false
                dns_servers:
                  get_param: DnsServers
                addresses:
                - ip_netmask:
                    list_join:
                    - /
                    - - get_param: ControlPlaneIp
                      - get_param: ControlPlaneSubnetCidr
                routes:
                - ip_netmask: 169.254.169.254/32
                  next_hop:
                    get_param: EC2MetadataIp
                - default: true
                  next_hop:
                    get_param: ControlPlaneDefaultRoute
                members:
                - type: interface
                  name: nic1
                  primary: true
                - type: vlan
                  vlan_id:
                    get_param: ExternalNetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: ExternalIpSubnet
                  routes:
                  - default: true
                    next_hop:
                      get_param: ExternalInterfaceDefaultRoute
                - type: vlan
                  vlan_id:
                    get_param: InternalApiNetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: InternalApiIpSubnet
                - type: vlan
                  vlan_id:
                    get_param: StorageNetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: StorageIpSubnet
                - type: vlan
                  vlan_id:
                    get_param: StorageMgmtNetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: StorageMgmtIpSubnet
                - type: vlan
                  vlan_id:
                    get_param: TenantNetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: TenantIpSubnet

outputs:
  OS::stack_id:
    description: The OsNetConfigImpl resource.
    value: {get_resource: OsNetConfigImpl}


vi /root/nic-configs/compute.yaml
heat_template_version: pike

parameters:
  ControlPlaneIp:
    default: ''
    description: IP address/subnet on the ctlplane network
    type: string
  ExternalIpSubnet:
    default: ''
    description: IP address/subnet on the external network
    type: string
  InternalApiIpSubnet:
    default: ''
    description: IP address/subnet on the internal_api network
    type: string
  StorageIpSubnet:
    default: ''
    description: IP address/subnet on the storage network
    type: string
  StorageMgmtIpSubnet:
    default: ''
    description: IP address/subnet on the storage_mgmt network
    type: string
  TenantIpSubnet:
    default: ''
    description: IP address/subnet on the tenant network
    type: string
  ManagementIpSubnet: # Only populated when including environments/network-management.yaml
    default: ''
    description: IP address/subnet on the management network
    type: string
  BondInterfaceOvsOptions:
    default: 'bond_mode=active-backup'
    description: The ovs_options string for the bond interface. Set things like
                 lacp=active and/or bond_mode=balance-slb using this option.
    type: string
  ExternalNetworkVlanID:
    default: 10
    description: Vlan ID for the external network traffic.
    type: number
  InternalApiNetworkVlanID:
    default: 20
    description: Vlan ID for the internal_api network traffic.
    type: number
  StorageNetworkVlanID:
    default: 30
    description: Vlan ID for the storage network traffic.
    type: number
  StorageMgmtNetworkVlanID:
    default: 40
    description: Vlan ID for the storage_mgmt network traffic.
    type: number
  TenantNetworkVlanID:
    default: 50
    description: Vlan ID for the tenant network traffic.
    type: number
  ManagementNetworkVlanID:
    default: 60
    description: Vlan ID for the management network traffic.
    type: number
  ExternalInterfaceDefaultRoute:
    default: '10.0.0.1'
    description: default route for the external network
    type: string
  ControlPlaneSubnetCidr: # Override this via parameter_defaults
    default: '24'
    description: The subnet CIDR of the control plane network.
    type: string
  ControlPlaneDefaultRoute: # Override this via parameter_defaults
    description: The default route of the control plane network.
    type: string
  DnsServers: # Override this via parameter_defaults
    default: []
    description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
    type: comma_delimited_list
  EC2MetadataIp: # Override this via parameter_defaults
    description: The IP address of the EC2 metadata server.
    type: string

resources:
  OsNetConfigImpl:
    type: OS::Heat::SoftwareConfig
    properties:
      group: script
      config:
        str_replace:
          template:
            get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
          params:
            $network_config:
              network_config:
              - type: ovs_bridge
                name: br-ex
                use_dhcp: false
                dns_servers:
                  get_param: DnsServers
                addresses:
                - ip_netmask:
                    list_join:
                    - /
                    - - get_param: ControlPlaneIp
                      - get_param: ControlPlaneSubnetCidr
                routes:
                - ip_netmask: 169.254.169.254/32
                  next_hop:
                    get_param: EC2MetadataIp
                - default: true
                  next_hop:
                    get_param: ControlPlaneDefaultRoute
                members:
                - type: interface
                  name: nic1
                  primary: true
                - type: vlan
                  vlan_id:
                    get_param: InternalApiNetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: InternalApiIpSubnet
                - type: vlan
                  vlan_id:
                    get_param: StorageNetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: StorageIpSubnet
                - type: vlan
                  vlan_id:
                    get_param: TenantNetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: TenantIpSubnet

outputs:
  OS::stack_id:
    description: The OsNetConfigImpl resource.
    value: {get_resource: OsNetConfigImpl}


vi /root/nic-configs/cinder-storage.yaml
heat_template_version: pike

parameters:
  ControlPlaneIp:
    default: ''
    description: IP address/subnet on the ctlplane network
    type: string
  ExternalIpSubnet:
    default: ''
    description: IP address/subnet on the external network
    type: string
  InternalApiIpSubnet:
    default: ''
    description: IP address/subnet on the internal_api network
    type: string
  StorageIpSubnet:
    default: ''
    description: IP address/subnet on the storage network
    type: string
  StorageMgmtIpSubnet:
    default: ''
    description: IP address/subnet on the storage_mgmt network
    type: string
  TenantIpSubnet:
    default: ''
    description: IP address/subnet on the tenant network
    type: string
  ManagementIpSubnet: # Only populated when including environments/network-management.yaml
    default: ''
    description: IP address/subnet on the management network
    type: string
  BondInterfaceOvsOptions:
    default: 'bond_mode=active-backup'
    description: The ovs_options string for the bond interface. Set things like
                 lacp=active and/or bond_mode=balance-slb using this option.
    type: string
  ExternalNetworkVlanID:
    default: 10
    description: Vlan ID for the external network traffic.
    type: number
  InternalApiNetworkVlanID:
    default: 20
    description: Vlan ID for the internal_api network traffic.
    type: number
  StorageNetworkVlanID:
    default: 30
    description: Vlan ID for the storage network traffic.
    type: number
  StorageMgmtNetworkVlanID:
    default: 40
    description: Vlan ID for the storage_mgmt network traffic.
    type: number
  TenantNetworkVlanID:
    default: 50
    description: Vlan ID for the tenant network traffic.
    type: number
  ManagementNetworkVlanID:
    default: 60
    description: Vlan ID for the management network traffic.
    type: number
  ExternalInterfaceDefaultRoute:
    default: '10.0.0.1'
    description: default route for the external network
    type: string
  ControlPlaneSubnetCidr: # Override this via parameter_defaults
    default: '24'
    description: The subnet CIDR of the control plane network.
    type: string
  ControlPlaneDefaultRoute: # Override this via parameter_defaults
    description: The default route of the control plane network.
    type: string
  DnsServers: # Override this via parameter_defaults
    default: []
    description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
    type: comma_delimited_list
  EC2MetadataIp: # Override this via parameter_defaults
    description: The IP address of the EC2 metadata server.
    type: string

resources:
  OsNetConfigImpl:
    type: OS::Heat::SoftwareConfig
    properties:
      group: script
      config:
        str_replace:
          template:
            get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
          params:
            $network_config:
              network_config: []

outputs:
  OS::stack_id:
    description: The OsNetConfigImpl resource.
    value: {get_resource: OsNetConfigImpl}


vi /root/nic-configs/swift-storage.yaml
heat_template_version: pike

parameters:
  ControlPlaneIp:
    default: ''
    description: IP address/subnet on the ctlplane network
    type: string
  ExternalIpSubnet:
    default: ''
    description: IP address/subnet on the external network
    type: string
  InternalApiIpSubnet:
    default: ''
    description: IP address/subnet on the internal_api network
    type: string
  StorageIpSubnet:
    default: ''
    description: IP address/subnet on the storage network
    type: string
  StorageMgmtIpSubnet:
    default: ''
    description: IP address/subnet on the storage_mgmt network
    type: string
  TenantIpSubnet:
    default: ''
    description: IP address/subnet on the tenant network
    type: string
  ManagementIpSubnet: # Only populated when including environments/network-management.yaml
    default: ''
    description: IP address/subnet on the management network
    type: string
  BondInterfaceOvsOptions:
    default: 'bond_mode=active-backup'
    description: The ovs_options string for the bond interface. Set things like
                 lacp=active and/or bond_mode=balance-slb using this option.
    type: string
  ExternalNetworkVlanID:
    default: 10
    description: Vlan ID for the external network traffic.
    type: number
  InternalApiNetworkVlanID:
    default: 20
    description: Vlan ID for the internal_api network traffic.
    type: number
  StorageNetworkVlanID:
    default: 30
    description: Vlan ID for the storage network traffic.
    type: number
  StorageMgmtNetworkVlanID:
    default: 40
    description: Vlan ID for the storage_mgmt network traffic.
    type: number
  TenantNetworkVlanID:
    default: 50
    description: Vlan ID for the tenant network traffic.
    type: number
  ManagementNetworkVlanID:
    default: 60
    description: Vlan ID for the management network traffic.
    type: number
  ExternalInterfaceDefaultRoute:
    default: '10.0.0.1'
    description: default route for the external network
    type: string
  ControlPlaneSubnetCidr: # Override this via parameter_defaults
    default: '24'
    description: The subnet CIDR of the control plane network.
    type: string
  ControlPlaneDefaultRoute: # Override this via parameter_defaults
    description: The default route of the control plane network.
    type: string
  DnsServers: # Override this via parameter_defaults
    default: []
    description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
    type: comma_delimited_list
  EC2MetadataIp: # Override this via parameter_defaults
    description: The IP address of the EC2 metadata server.
    type: string

resources:
  OsNetConfigImpl:
    type: OS::Heat::SoftwareConfig
    properties:
      group: script
      config:
        str_replace:
          template:
            get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
          params:
            $network_config:
              network_config: []

outputs:
  OS::stack_id:
    description: The OsNetConfigImpl resource.
    value: {get_resource: OsNetConfigImpl}


vi /root/nic-configs/ceph-storage.yaml
heat_template_version: pike

parameters:
  ControlPlaneIp:
    default: ''
    description: IP address/subnet on the ctlplane network
    type: string
  ExternalIpSubnet:
    default: ''
    description: IP address/subnet on the external network
    type: string
  InternalApiIpSubnet:
    default: ''
    description: IP address/subnet on the internal_api network
    type: string
  StorageIpSubnet:
    default: ''
    description: IP address/subnet on the storage network
    type: string
  StorageMgmtIpSubnet:
    default: ''
    description: IP address/subnet on the storage_mgmt network
    type: string
  TenantIpSubnet:
    default: ''
    description: IP address/subnet on the tenant network
    type: string
  ManagementIpSubnet: # Only populated when including environments/network-management.yaml
    default: ''
    description: IP address/subnet on the management network
    type: string
  BondInterfaceOvsOptions:
    default: 'bond_mode=active-backup'
    description: The ovs_options string for the bond interface. Set things like
                 lacp=active and/or bond_mode=balance-slb using this option.
    type: string
  ExternalNetworkVlanID:
    default: 10
    description: Vlan ID for the external network traffic.
    type: number
  InternalApiNetworkVlanID:
    default: 20
    description: Vlan ID for the internal_api network traffic.
    type: number
  StorageNetworkVlanID:
    default: 30
    description: Vlan ID for the storage network traffic.
    type: number
  StorageMgmtNetworkVlanID:
    default: 40
    description: Vlan ID for the storage_mgmt network traffic.
    type: number
  TenantNetworkVlanID:
    default: 50
    description: Vlan ID for the tenant network traffic.
    type: number
  ManagementNetworkVlanID:
    default: 60
    description: Vlan ID for the management network traffic.
    type: number
  ExternalInterfaceDefaultRoute:
    default: '10.0.0.1'
    description: default route for the external network
    type: string
  ControlPlaneSubnetCidr: # Override this via parameter_defaults
    default: '24'
    description: The subnet CIDR of the control plane network.
    type: string
  ControlPlaneDefaultRoute: # Override this via parameter_defaults
    description: The default route of the control plane network.
    type: string
  DnsServers: # Override this via parameter_defaults
    default: []
    description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
    type: comma_delimited_list
  EC2MetadataIp: # Override this via parameter_defaults
    description: The IP address of the EC2 metadata server.
    type: string

resources:
  OsNetConfigImpl:
    type: OS::Heat::SoftwareConfig
    properties:
      group: script
      config:
        str_replace:
          template:
            get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
          params:
            $network_config:
              network_config:
              - type: ovs_bridge
                name: br-ex
                use_dhcp: false
                dns_servers:
                  get_param: DnsServers
                addresses:
                - ip_netmask:
                    list_join:
                    - /
                    - - get_param: ControlPlaneIp
                      - get_param: ControlPlaneSubnetCidr
                routes:
                - ip_netmask: 169.254.169.254/32
                  next_hop:
                    get_param: EC2MetadataIp
                - default: true
                  next_hop:
                    get_param: ControlPlaneDefaultRoute
                members:
                - type: interface
                  name: nic1
                  primary: true
                - type: vlan
                  vlan_id:
                    get_param: StorageNetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: StorageIpSubnet
                - type: vlan
                  vlan_id:
                    get_param: StorageMgmtNetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: StorageMgmtIpSubnet

outputs:
  OS::stack_id:
    description: The OsNetConfigImpl resource.
    value: {get_resource: OsNetConfigImpl}


bash quickstart.sh --clean --playbook baremetal-undercloud.yml --config /root/config.yml --release pike --tags all $VIRTHOST

......

PLAY RECAP **************************************************************************************************************************************************
localhost                  : ok=21   changed=13   unreachable=0    failed=0
undercloud                 : ok=119  changed=71   unreachable=0    failed=0

Wednesday 21 June 2018  06:49:57 +0000 (0:04:53.750)       2:35:29.940 ********
===============================================================================
overcloud-deploy : Deploy the overcloud ----------------------------------------------------------------------------------------------------------- 4695.84s
/root/.quickstart/usr/local/share/ansible/roles/overcloud-deploy/tasks/deploy-overcloud.yml:1 --------------------------------------------------------------
undercloud-deploy : Install the undercloud -------------------------------------------------------------------------------------------------------- 2123.31s
/root/.quickstart/usr/local/share/ansible/roles/undercloud-deploy/tasks/install-undercloud.yml:6 -----------------------------------------------------------
fetch-images : Get image --------------------------------------------------------------------------------------------------------------------------- 571.87s
/root/.quickstart/tripleo-quickstart/roles/fetch-images/tasks/fetch.yml:107 --------------------------------------------------------------------------------
overcloud-prep-images : Prepare the overcloud images for deploy ------------------------------------------------------------------------------------ 512.60s
/root/.quickstart/usr/local/share/ansible/roles/overcloud-prep-images/tasks/overcloud-prep-images.yml:1 ----------------------------------------------------
validate-simple : Validate the overcloud ----------------------------------------------------------------------------------------------------------- 293.75s
/root/.quickstart/usr/local/share/ansible/roles/validate-simple/tasks/main.yml:34 --------------------------------------------------------------------------
baremetal-undercloud/packages : Install TripleO package -------------------------------------------------------------------------------------------- 279.79s
/root/.quickstart/usr/local/share/ansible/roles/baremetal-undercloud/packages/tasks/main.yml:5 -------------------------------------------------------------
baremetal-prep-overcloud : Run install upstream ipxe script ---------------------------------------------------------------------------------------- 159.65s
/root/.quickstart/usr/local/share/ansible/roles/baremetal-prep-overcloud/tasks/install-upstream-ipxe.yml:9 -------------------------------------------------
fetch-images : Get image ---------------------------------------------------------------------------------------------------------------------------- 92.69s
/root/.quickstart/tripleo-quickstart/roles/fetch-images/tasks/fetch.yml:107 --------------------------------------------------------------------------------
overcloud-prep-flavors : Prepare the scripts for overcloud flavors ---------------------------------------------------------------------------------- 72.21s
/root/.quickstart/usr/local/share/ansible/roles/overcloud-prep-flavors/tasks/overcloud-prep-flavors.yml:1 --------------------------------------------------
baremetal-undercloud/packages : Install additional packages ----------------------------------------------------------------------------------------- 70.11s
/root/.quickstart/usr/local/share/ansible/roles/baremetal-undercloud/packages/tasks/main.yml:15 ------------------------------------------------------------
repo-setup : Setup repos on live host --------------------------------------------------------------------------------------------------------------- 39.72s
/root/.quickstart/tripleo-quickstart/roles/repo-setup/tasks/setup_repos.yml:1 ------------------------------------------------------------------------------
overcloud-deploy : Run post-deploy script ----------------------------------------------------------------------------------------------------------- 30.74s
/root/.quickstart/usr/local/share/ansible/roles/overcloud-deploy/tasks/post-deploy.yml:10 ------------------------------------------------------------------
overcloud-prep-config : Push baremetal nic-configs directory (if defined) --------------------------------------------------------------------------- 20.38s
/root/.quickstart/usr/local/share/ansible/roles/overcloud-prep-config/tasks/main.yml:53 --------------------------------------------------------------------
overcloud-prep-network : Prepare the network-isolation required networks on the undercloud ---------------------------------------------------------- 17.28s
/root/.quickstart/usr/local/share/ansible/roles/overcloud-prep-network/tasks/overcloud-prep-network.yml:1 --------------------------------------------------
baremetal-undercloud/packages : Synchronize time immediately with ntpdate --------------------------------------------------------------------------- 11.51s
/root/.quickstart/usr/local/share/ansible/roles/baremetal-undercloud/packages/tasks/ntp.yml:56 -------------------------------------------------------------
fetch-images : Get tar images from cache ------------------------------------------------------------------------------------------------------------- 9.34s
/root/.quickstart/tripleo-quickstart/roles/fetch-images/tasks/fetch.yml:186 --------------------------------------------------------------------------------
baremetal-undercloud/packages : Install ntp packages ------------------------------------------------------------------------------------------------- 8.56s
/root/.quickstart/usr/local/share/ansible/roles/baremetal-undercloud/packages/tasks/ntp.yml:2 --------------------------------------------------------------
validate-perf : Install the latest version of dstat on overcloud ------------------------------------------------------------------------------------- 7.87s
/root/.quickstart/usr/local/share/ansible/roles/validate-perf/tasks/main.yml:4 -----------------------------------------------------------------------------
fetch-images : Get tar images from cache ------------------------------------------------------------------------------------------------------------- 7.53s
/root/.quickstart/tripleo-quickstart/roles/fetch-images/tasks/fetch.yml:186 --------------------------------------------------------------------------------
fetch-images : Get actual md5 checksum of image ------------------------------------------------------------------------------------------------------ 6.72s
/root/.quickstart/tripleo-quickstart/roles/fetch-images/tasks/fetch.yml:118 --------------------------------------------------------------------------------
+ set +x



undercloud(loing as root):
yum -y groupinstall "GNOME Desktop"

systemctl set-default graphical.target

systemctl start graphical.target

undercloud(loing as root):
Applications-->Favorites-->Terminal
ssh -F /root/.quickstart/ssh.config.ansible undercloud

sudo hiera admin_password
875e980c411e48356a24982c856a1d35ddc9ea41

Applications-->Favorites-->Firefox Web Browser
https://192.168.24.2
admin
875e980c411e48356a24982c856a1d35ddc9ea41

Overcloud information:

    Overcloud IP address: 10.0.0.20
    Username: admin
    Password: gDqqVguFgDxujRp6hBBZfF4Cv

http://10.0.0.20
admin
gDqqVguFgDxujRp6hBBZfF4Cv

Install OpenStack-RDO-All-In-One(ocata) On CentOS 7.3(Minimal)

  • 列印
  • Email
詳細內容
分類: Cloud
發佈: 2017-12-05, 週二 04:39
作者 Super User
點擊數: 28803

From: https://www.rdoproject.org/install/packstack/

vi /etc/sysconfig/network-scripts/ifcfg-ens33
IPADDR=10.0.0.2
PREFIX=24
GATEWAY=10.0.0.1

systemctl disable firewalld
systemctl stop firewalld
systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network


yum -y install net-tools

yum -y update

vi /etc/selinux/config
SELINUX=disabled

timedatectl set-timezone Asia/Hong_Kong

vi /etc/environment
LANG=en_US.utf-8
LC_ALL=en_US.utf-8

yum install -y chrony
systemctl enable chronyd.service
systemctl start chronyd.service

echo "controller.jason-tang.com" > /etc/hostname

echo "10.0.0.2 controller.jason-tang.com controller" > /etc/hosts

reboot

yum install -y centos-release-openstack-ocata
yum update -y

yum install -y openstack-packstack openstack-utils
yum update -y


packstack --gen-answer-file=/root/answerfile.txt

openstack-config --set /root/answerfile.txt general CONFIG_NEUTRON_OVS_BRIDGE_IFACES br-ex:ens33
openstack-config --set /root/answerfile.txt general CONFIG_PROVISION_DEMO n
openstack-config --set /root/answerfile.txt general CONFIG_PROVISION_DEMO_FLOATRANGE 10.0.0.0/24
openstack-config --set /root/answerfile.txt general CONFIG_PROVISION_TEMPEST_FLOATRANGE 10.0.0.0/24

packstack --answer-file=/root/answerfile.txt

source keystonerc_admin
neutron net-create external_network --provider:network_type flat --provider:physical_network extnet --router:external=True
neutron subnet-create --name external_subnet --enable_dhcp=False --allocation-pool=start=10.0.0.20,end=10.0.0.30 --gateway=10.0.0.1 external_network 10.0.0.0/24
neutron router-create router1
neutron router-gateway-set router1 external_network
neutron net-create private_network
neutron subnet-create --name private_subnet private_network 172.16.0.0/24
neutron router-interface-add router1 private_subnet

curl http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img | glance image-create --name='cirros image' --visibility=public --container-format=bare --disk-format=qcow2

reboot

http://10.0.0.2/dashboard

更多文章...

  1. Install Postfix On FreeBSD 11.0(Minimal+ports+src+sshd_enable+disable sendmail)
  2. Active Directory Migration From Windows Server 2000 to Windows Server 2016

第 1 頁,共 2 頁

  • 最先
  • 上一篇
  • 1
  • 2
  • 下一篇
  • 最後