Skip to content

Commit

Permalink
Add required files
Browse files Browse the repository at this point in the history
  • Loading branch information
urao committed Jul 16, 2018
1 parent 1fc4782 commit b6f4f0f
Show file tree
Hide file tree
Showing 15 changed files with 1,463 additions and 6 deletions.
8 changes: 5 additions & 3 deletions rhosp10-contrail411/scripts/create_stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ time openstack overcloud deploy --stack $STACK_NAME \
--templates $TEMPLATE_DIR \
-r $TEMPATE_ENV_DIR/contrail/roles_data.yaml \
-e $TEMPLATE_ENV_DIR/puppet-pacemaker.yaml \
-e $TEMPLATE_ENV_DIR/contrail/contrail-services.yaml \
-e $TEMPLATE_ENV_DIR/contrail/contrail-isolation.yaml \
-e $TEMPLATE_ENV_DIR/network-management.yaml \
-e $TEMPLATE_ENV_DIR/contrail/ips-from-pool-all.yaml \
-e $TEMPLATE_ENV_DIR/contrail/contrail-services.yaml \
-e $TEMPLATE_ENV_DIR/contrail/hostname-map.yaml \
-e $TEMPLATE_ENV_DIR/contrail/scheduler-hints.yaml \
-e $TEMPLATE_ENV_DIR/contrail/network-isolation.yaml \
-e $TEMPLATE_ENV_DIR/contrail/contrail-net.yaml \
-e $TEMPLATE_ENV_DIR/contrail/ips-from-pool-all.yaml \
-e $TEMPLATE_DIR/extraconfig/pre_deploy/rhel-registration/environment-rhel-registration.yaml \
-e $TEMPLATE_DIR/extraconfig/pre_deploy/rhel-registration/rhel-registration-resource-registry.yaml \
--ntp-server $NTP_SERVER_IP
Expand Down
7 changes: 6 additions & 1 deletion rhosp10-contrail411/scripts/create_vm.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/env bash
set -xv

source /home/stack/overcloudrc.v3
BASE_DIR=/home/stack/
UNDERCLOUD_RC=$BASE_DIR/stackrc
OVERCLOUD_RC=$BASE_DIR/overcloudrc.v3

echo "Install openstack pkgs"
yum install -y gcc python-devel
Expand All @@ -13,6 +15,9 @@ cd /home/stack/images/
wget http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img
openstack image create "cirros" --disk-format qcow2 --container-format bare --public --file /home/stack/images/cirros-0.4.0-i386-disk.img


source $OVERCLOUD_RC

glance image-list
openstack flavor create --ram 1024 --disk 20 --vcpus 1 --public small

Expand Down
23 changes: 21 additions & 2 deletions rhosp10-contrail411/steps_to_install_appformix.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
## Below steps to create appformix VM's in RHOSP10+Contrail 4.1.1 Environment
### Steps to create Appformix VM's in RHOSP10+Contrail 4.1.1 Environment

### Execute below steps to run on undercloud VM
#### Steps to run on undercloud VM
```
export LIBGUESTFS_BACKEND=direct
qemu-img create -f qcow2 -o preallocation=metadata appformix001.qcow2 100G
virt-resize --expand /dev/sda1 rhel-server-7.5-x86_64-kvm.qcow2 appformix001.qcow2
virt-customize -a appformix001.qcow2 --hostname appformix001 --timezone America/Los_Angeles --run-command 'xfs_growfs /' --root-password password:test2017! --run-command 'sed -i "s/PasswordAuthentication no/PasswordAuthentication yes/g" /etc/ssh/sshd_config' --run-command 'systemctl enable sshd' --run-command 'yum remove -y cloud-init' --selinux-relabel
Create interface configuration, for controlplane, internal_api, external networks
virt-customize -a appformix001.qcow2 --run-command 'cat << EOF /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
HOTPLUG=no
NM_CONTROLLED=no
PEERDNS=no
BOOTPROTO=static
IPADDR=10.74.255.10
NETMASK=255.255.255.224
EOF'
virt-install --ram 32768 --vcpus 4 --os-variant rhel7 --disk path=/var/lib/libvirt/images/appformix001.qcow2,device=disk,bus=virtio,format=qcow2 --noautoconsole --vnc --bridge br-eno1 --bridge br_bond0 --name appformix001 --cpu SandyBridge,+vmx --dry-run --print-xml > /tmp/appformix001.xml
virsh define /tmp/appformix001.xml
virsh start appformix001
```
If the deployment is behind proxy, set environment variables with IP:port information
```
export http_proxy=http://<IP>:Port
```
80 changes: 80 additions & 0 deletions rhosp10-contrail411/tripleo-env-contrail/contrail-net.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
resource_registry:
OS::TripleO::Compute::Net::SoftwareConfig: contrail-nic-config-compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig: contrail-nic-config-os-controller.yaml
OS::TripleO::ContrailController::Net::SoftwareConfig: contrail-nic-config.yaml
OS::TripleO::ContrailAnalytics::Net::SoftwareConfig: contrail-nic-config.yaml
OS::TripleO::ContrailAnalyticsDatabase::Net::SoftwareConfig: contrail-nic-config.yaml
OS::TripleO::ContrailTsn::Net::SoftwareConfig: contrail-nic-config-compute.yaml
OS::TripleO::ContrailDpdk::Net::SoftwareConfig: contrail-nic-config-compute-bond-vlan-dpdk.yaml

parameter_defaults:
## For Neutron port.
ManagementNetCidr: 12.18.250.0/27
ManagementNetworkVlanID: 23
ManagementAllocationPools: [{'start': '12.18.250.2', 'end': '12.18.250.30'}]
ExternalNetCidr: 12.18.250.32/27
ExternalNetworkVlanID: 26
ExternalAllocationPools: [{'start': '12.18.250.34', 'end': '12.18.250.62'}]
InternalApiNetCidr: 10.64.255.128/27
InternalApiNetworkVlanID: 12
InternalApiAllocationPools: [{'start': '10.64.255.130', 'end': '10.64.255.158'}]
TenantNetCidr: 10.64.255.160/27
TenantNetworkVlanID: 16
TenantAllocationPools: [{'start': '10.64.255.162', 'end': '10.64.255.190'}]
StorageMgmtNetCidr: 10.64.255.96/27
StorageMgmtNetworkVlanID: 29
StorageMgmtAllocationPools: [{'start': '10.64.255.98', 'end': '10.64.255.126'}]
StorageNetCidr: 12.168.135.0/23
StorageNetworkVlanID: 17
StorageAllocationPools: [{'start': '12.168.135.2', 'end': '12.168.135.99'}]
## For interface in each instance
ControlPlaneSubnetCidr: '27'
ControlPlaneDefaultRoute: 10.64.255.194

# ExternalInterfaceDefaultRoute: 172.18.250.33
EC2MetadataIp: 10.64.255.194
DnsServers: ["10.64.255.194"]

TimeZone: 'America/Los_Angeles'
MTU: 9000

# vRouter kernel
VrouterPhysicalInterface: vlan16
VrouterGateway: 10.64.255.190
VrouterNetmask: 255.255.255.224
ControlVirtualInterface: vlan12
PublicVirtualInterface: vlan26
## if PhysicalInterface is a vlan interface using vlanX notation
VlanParentInterface: bond0
## if vhost0 is based on a bond
BondInterface: bond0
BondInterfaceMembers: enp129s0f1,enp129s0f0
BondMode: 4
BondPolicy: 1

#Tsn params
# VrouterTsnPhysicalInterface: eth1
# VlanTsnParentInterface: eth1
# BondTsnInterface: bond0
# BondTsnInterfaceMembers: eth0,eth1
# BondTsnMode: 4
# BondTsnPolicy: 1

#DPDK params
#VrouterDpdkPhysicalInterface: vlan160
#VrouterDpdkPhysicalInterface: bond0
#ContrailVrouterDpdkPhysicalInterface: bond0
#BondDpdkInterface: bond0
#ContrailBondDpdkInterface: bond0
#BondDpdkInterfaceMembers: enp175s0f1,enp175s0f0
#ContrailBondDpdkInterfaceMembers: enp175s0f1,enp175s0f0
#VlanDpdkParentInterface: bond0
#ContrailVlanDpdkParentInterface: bond0
#BondDpdkMode: 4
#BondDpdkPolicy: 1
#ContrailBondDpdkPolicy: 1
#ContrailDpdkHugePages: 2048
##ContrailDpdkCoremask: 0xf
#ContrailDpdkDriver: uio_pci_generic
#BondInterfaceLinuxOptions: "mode=802.3ad lacp_rate=fast miimon=100 xmit_hash_policy=layer3+4"

Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
heat_template_version: 2015-04-30

description: >
Software Config to drive os-net-config to configure multiple interfaces
for the compute role.
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
InternalApiDefaultRoute: # Not used by default in this template
default: '10.0.0.1'
description: The default route of 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
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
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
ExternalInterfaceDefaultRoute: # Not used by default in this template
default: '10.0.0.1'
description: The default route of the external network.
type: string
ManagementInterfaceDefaultRoute: # Commented out by default in this template
default: unset
description: The default route of the management 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::StructuredConfig
properties:
group: os-apply-config
config:
os_net_config:
network_config:
-
type: interface
name: eno1
use_dhcp: false
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}
-
type: vlan
vlan_id: {get_param: ManagementNetworkVlanID}
device: eno1
addresses:
-
ip_netmask: {get_param: ManagementIpSubnet}
-
type: linux_bond
name: bond0
use_dhcp: false
bonding_options: "mode=802.3ad"
-
type: interface
name: vhost0
use_dhcp: false
addresses:
-
ip_netmask: {get_param: TenantIpSubnet}
-
type: linux_bond
name: bond1
use_dhcp: false
bonding_options: "mode=802.3ad"
#bonding_options: "mode=4 miimon=100"
members:
-
type: interface
name: enp116s0f0
primary: true
-
type: interface
name: enp116s0f1
-
type: vlan
vlan_id: {get_param: InternalApiNetworkVlanID}
device: bond1
addresses:
-
ip_netmask: {get_param: InternalApiIpSubnet}
-
type: vlan
vlan_id: {get_param: StorageNetworkVlanID}
device: bond1
addresses:
-
ip_netmask: {get_param: StorageIpSubnet}
-
type: vlan
vlan_id: {get_param: StorageMgmtNetworkVlanID}
device: bond1
addresses:
-
ip_netmask: {get_param: StorageMgmtIpSubnet}
outputs:
OS::stack_id:
description: The OsNetConfigImpl resource.
value: {get_resource: OsNetConfigImpl}
Loading

0 comments on commit b6f4f0f

Please sign in to comment.