summaryrefslogtreecommitdiffstats
path: root/foreman/ci/deploy.sh
AgeCommit message (Collapse)AuthorFilesLines
2015-09-23Fixes public gateway to be the correct valueTim Rozet1-1/+1
Bug where default gateway was always being set to the first IP in the subnet. Now should detect correct public gateway. This only impacts the default gateway configured on the external neturon "provider_subnet". JIRA: APEX-37 Change-Id: I0296fa7149679a0f2eb47f7d65e0011f366c1147 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-09-18Adds single NIC support for baremetal deploymentsTim Rozet1-84/+210
Simply use a new argument "-single_baremetal_nic <nic name>" to define which NIC to bridge to on your host. Also ensure when using this arg that your ksgen_settings file has mac_address and private_mac as the same value for your controllers (since you are using a single interface). JIRA: APEX-33 Change-Id: I69095ccc4b907ae3c6ea3e88b2d1c9af9894c5cb Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-09-17Corrects the default route on controllersrandyl1-0/+8
BGS-84 After the changes to br-ex on the control nodes. The default route was no longer correct on the control nodes in bare metal deployments. Added an admin_network paramater for barmetal deployments. Added logic on br-ex in to set DEROUTE=no on the admin network in the extern_net_presetup. Tested on HA physical deployment. Change-Id: Ic4b1ef521da2c55590990411f3f2444d4c94b019 Signed-off-by: randyl <r.levensalor@cablelabs.com>
2015-09-11Merge "Allows domain name to be configured"Tim Rozet1-2/+6
2015-09-11Allows domain name to be configuredTim Rozet1-2/+6
Users may now provide domain_name in the ksgen settings file (along with setting the correct and respective hostnames). This domain name will be used for all of the deployed machines. JIRA: BGS-86 Change-Id: I34b6da07dd565648399ea7a1abf2abe1ae62d91a Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-09-11Foreman deploy.sh bug corrected when finding the interfacesjose.lausuch1-1/+2
Change-Id: Ifb1ab47017ab28fab0a39961c2fd7728d2098cda Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2015-09-10Merge "Adds functionality to modify VM resources"Tim Rozet1-5/+86
2015-09-09Adds functionality to modify VM resourcesTim Rozet1-5/+86
VM resources (vcpus, memory, disk size) are now configurable in the opnfv_ksgen_settings files. Each node in the ksgen settings file now has "memory, cpus, disk" attributes: - cpus is an integer number of CPUs to assign to the VM - memory is an integer size in kilobytes - disk is an integer size in gigabytes The vagrant box vmdk is resized for each VM. Each VM will then modify its partition to the new size, execute the normal reboot, then extend the physical+logical volumes and filesystem using vagrant provisioning scripts. JIRA: APEX-1 Change-Id: I471319db14d2189052961b2f533c65850ebeb1e7 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-09-09Merge "Fixes horizon IP URL for non-HA deployments"Tim Rozet1-1/+15
2015-09-08Fixes horizon IP URL for non-HA deploymentsTim Rozet1-1/+15
The printed horizon URL at the end of a successful deployment was incorrect for non-HA deployments. The private IP was being printed which is not publicly accessible. This patch fixes the URL printed to be the public IP of the control node - the correct URL. JIRA: APEX-12 Change-Id: Ia2f594e0cf839a9100c3bf5715a38fe4fd243bfe Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-09-08Adds check to ensure that provided static_ip_range param is correctTim Rozet1-0/+7
Patch adds a check to make sure that the user specified static_ip_range argument (Ex. 192.168.0.10,192.168.0.20) falls within the valid public subnet of the host (the same subnet as the default gateway). JIRA: APEX-19 Change-Id: Ifc0b79074b887509617c2749e50d97d1800abad0 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-09-03Fixes bug in looking for interfacesTim Rozet1-1/+1
Issue where the wrong field was being used for finding interfaces. JIRA: APEX-11 Change-Id: I94635837c73acd0d271dbc9d0474dc5ba688ff10 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-09-02Merge "Removes default vagrant route from virtual nodes"Tim Rozet1-0/+1
2015-09-01Fixes issue with deploy copying from /tmp and clean bailing earlyTim Rozet1-2/+1
deploy.sh was failing in user deployments because the necessary puppet modules and vagrant files were being copied accidentally from /tmp and not the script directory. This patch fixes that issue. clean.sh was failing checks to see if vagrant or virtualbox was still running, due to a bug with checking "ps" and using grep. This patch resolves that. JIRA: APEX-16,APEX-17 Change-Id: I1faa6fc134c0308acb2e7b14be30f7cd3c99d109 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-09-01Removes default vagrant route from virtual nodesTim Rozet1-0/+1
Removes default gateway route to 10.0.2.2 after adding public default route JIRA: APEX-2 Change-Id: I7ba23e916f3995f39ee1677007ae5c1612cb3cc9 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-09-01Merge "Fixes puppet modules to come from Genesis repo"Tim Rozet1-21/+8
2015-08-31Fixes puppet modules to come from Genesis repoTim Rozet1-21/+8
This patch deprecates the use of puppet-trystack repo and migrates the puppet modules even to Genesis. deploy.sh now now copies the modules from the current Genesis repo into foreman VM's /vagrant to be used during install (rather than recloning). Associated changes in Khaleesi/QuickStack: - Khaleesi: commit 31b912778847f295d1459a71e5c41c808977c91d - Astapor: commit ac4be11e348d7bcff1e1aa28c96056e18dba5291 JIRA: APEX-8 Change-Id: I322ac797d1d687f17434e07e6775acef8961bdef Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-08-28Fixes bug with interface detectionTim Rozet1-3/+3
This patch addresses the detection of the physical NICs to bridge to. There was a bug where the regexp would ignore some NICs on accident, and the purpose of the expression was to ignore virtual NICs. Rather than ignore NICs by their name, this patch ensures that NICs are ignored if they are actually virtual types. Also fixes syntax issue with checking for nic_arg_flag. JIRA: APEX-11 Change-Id: Ibd965c454faab1d751e3ce0b260eabc7fbe7c720 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-08-28Merge "Adds ability to specify NICs to bridge on the jumphost"Dan Radez1-109/+139
2015-08-27Merge "Fixes vagrant base box to be opnfv"Tim Rozet1-2/+2
2015-08-27Merge "Adds baremetal node power check before attempting deploy"Tim Rozet1-0/+68
2015-08-27Fixes vagrant base box to be opnfvTim Rozet1-2/+2
Chef removed the centos7 basebox from Atlas. A new opnfv base box was added. This patch includes the modifications necessary to point to that new box. JIRA: APEX-14 Change-Id: I7e74726c692f21583d0d70f9dd7558665dfb5d99 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-08-27Adds baremetal node power check before attempting deployTim Rozet1-0/+68
Ensures nodes are shutoff if a baremetal deployment, before attempting to deploy. Previous behavior is deploy will run up to Foreman pxeboot, then fail. We can save a lot of time by detecting this up front. Nodes must be shutoff before deploying. JIRA: BGS-68 Change-Id: Ie585e12a5271bc1baac60f6256f85e5cb1b1baeb Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-08-27Adds ability to specify NICs to bridge on the jumphostTim Rozet1-109/+139
This patch adds new functionality to be able to specify the physical interfaces on the jumphost to bridge to (rather than figured out dynamically). The patch introduces new args for each nic: - admin_nic - private_nic - public_nic - storage_nic The public_nic is the only arg to be used when using -virtual. In baremetal: admin_nic, private_nic, and public_nic must either be all or none specified. The patch also cleans up virtual node logic, which was working, but had unnecessary logic. JIRA: APEX-4 Change-Id: Ic0a2e1d8ce2b7464441e3e9041faf123b86ca7e6 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-08-26Adds check to ensure 3 control nodes are defined with HATim Rozet1-0/+14
New check makes sure that 3 controller nodes are defined in base_config when ha_flag is set to true in base_config. JIRA: APEX-7 Change-Id: I7f49dec82704d8c9cbbcf17eb004b0adede406b3 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-07-22Adds check to make sure subnets are a minimum size per networkTim Rozet1-0/+50
Verifies that subnets are at least these sizes for deploy: - admin: 5 IPs - private: 10 IPs - public: 25 IPs - storage: 10 IPs JIRA: BGS-71 Change-Id: I0a6c373c9a8737fa9f0c2712851616dc301968f3 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-07-16Fixed public IP allocation JIRA: BGS-89randyl1-9/+20
For bare metal deployments, the list IP of the last IP of the subnet and 20 IPs before are reservered for neutron public IPs. A new function to subtract a number from an IP was added. Really fixed the logic for skipping 10 IP for VIPs was flipped to treat no_dhcp with static IPs as a special case. Removed a false print statement that the foreman VM is running. Consolidated two identical print messages with the public IP range. Change-Id: I189b9440dafd98e49d9a147515810e44b97ab256 Signed-off-by: randyl <r.levensalor@cablelabs.com>
2015-07-14Fixes issue where git clone failsTim Rozet1-2/+2
Looks like for some reason GIT_SSL_NO_VERIFY=true is required for the git clone to work in LF lab. I guess git cannot recognize the SSL cert. However, this same git clone command works on another non-LF server that is using the same exact git version without the need for this fix. JIRA: BGS-60 Change-Id: I2a71902b3fe01026644ada29bef67c3db3cda711 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-07-14Fixes syntax error with git clone for genesisTim Rozet1-2/+2
JIRA: BGS-60 Change-Id: I23a004d41ff8fd37a0ddcae1b4831a333000cae8 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-07-14Migrates from github bgs_vagrant project to genesisTim Rozet1-15/+43
No longer relies on bgs_vagrant github project. Now Foreman VM is created under /var/opt/opnfv/foreman_vm, instead of /tmp/bgs_vagrant for better naming convention and file location. Other VM nodes are also placed in /var/opt/opnfv/. JIRA: BGS-60 Change-Id: I009d907ad777750168b822ab86cd11515e28cdd7 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-07-10Take care of the subnet on public subnetarnaudmorin1-4/+24
This patch will take care of the subnet on public range. Instead of having a stoned /24, we can use now use at least /27 subnet (because foreman will try to use 20 IPs for public floating ip pool) This is not the best way to do that, but it's better than the current way. It also add a parameter to set the number of floating IP we want to use from the public subnet in provider network. Change-Id: I467f2a4098d2da3c6f666453cead64e18d0c655c JIRA: BGS-75 Signed-off-by: arnaudmorin <arnaud.morin@gmail.com>
2015-07-06Fixes networking related constraints for Virtual deploymentsTim Rozet1-90/+340
Patchset fixes the following: - Virtual deployment no longer requires 3 networks, does a lookup of the public interface on the server to bridge to, and then uses internal VirtualBox networks for the other admin and private networks - enable_virtual_dhcp option now allows enabling of Foreman DHCP server. This new default behavior is to use static IP address in virtual deployments. This is more useful in environments where disabling DHCP on the public network is not an option. - static_ip_range argument used to define which IP block to use out of the public network for the deployment. Valid only in virtual deployment. - puppet verification for virtual deployments added - horizon and foreman URLs will now be printed at the end of deployment - fixes and updates to non-HA deployments - ping_site argument now allows users to specify the site to verify VM internet connectivity. Default is google.com which is unreachable in China JIRA: BGS-73 Change-Id: I63b4c91477591d2f9436b5e6f59a2f2ee021d7d7 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-06-24Moved 80% of Foreman deploy.sh into functionsrandyl1-435/+509
To help with readability and troubleshooting, the 80% of the script that was not in a function were added to functions based on logical blocks. Neither functional nor order of execution changes were made to the script. Since most of the file and other Foreman CI scripts use a 2 space indent, that was also applied uniformly across the file. Change-Id: I83b96e231d484813025f6aa900cf2ffc92e94397 Signed-off-by: randyl <r.levensalor@cablelabs.com>
2015-06-17Fixing verification of vbox drivers JIRA: BGS-74randyl1-1/+2
With the foreman install the vboxdrv module is not loaded then the deploy.sh script attempts to load the driver by running ‘/etc/init.d/vboxdrv setup’ and checks the return code for success. However, /etc/init.d/vboxdrv will return 0 as long a valid parameter was passed on the command line. In the case of a failure, a failure message will be logged and the return code will still be 0. For instance if the kvm module is already loaded, the VirtualBox driver will never install. deploy.sh will now check for the VirtualBox kernel module with lsmod after the setup script is installed. The deploy.sh will now exit if the vboxdrv is not loaded. Change-Id: I702819cbf28afb08e0035e08918390af85c07674 Signed-off-by: randyl <r.levensalor@cablelabs.com>
2015-06-02Changes deploy to use frozen Arno release versions for Foreman relatedTim Rozet1-2/+2
tools JIRA: BGS-56 Change-Id: I4af161c7294c7a576920a8400b2d608ccbcbb323 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-06-01Pin software dependency versions in Foreman deployDaniel Farrell1-12/+7
Software released under 'Arno' should be pinned to at least the major version, to guarantee API backwards compatibility. JIRA: BGS-54 Change-Id: Iad027f1dc40b17c611ef183ffbae834b0dd1b970 Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
2015-05-26Merge "Really kill VBoxHeadless process"Dan Radez1-1/+1
2015-05-20Adds external network support for OPNFVTim Rozet1-0/+45
Deploy will now detect and set extra parameters in the ksgen settings file needed in order to configure an external public network for Neutron. The new parameters required are as follows: - external_network_flag: "true" - public_gateway: - public_dns: - public_network: - public_subnet: - public_allocation_start: - public_allocation_end: - deployment_type: public_* parameters are required to create an external network when external_network_flag is "true". deployment_type (three_network or multi_network) is now passed to Foreman. Foreman decides on this value whether to configure 3 interfaces as dhcp+onboot or 4. Change-Id: Ia8af04e82f3854a36adc563c1855d451ddfa9c17 JIRA: BGS-13 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-05-20Really kill VBoxHeadless processarnaudmorin1-1/+1
This correct a small typo that prevent the clean script to kill VBoxHeadless correctly This also add the psmisc package to dependency list in order to have the killall command JIRA: BGS-49 JIRA: BGS-50 Change-Id: I39143bdbc8076318c5a28868c4bb779411742c09 Signed-off-by: arnaudmorin <arnaud.morin@gmail.com>
2015-05-12Adds node virtualization supportTim Rozet1-2/+175
This patch adds the argument "-virtual" which allows one to deploy to Vagrant VMs rather than baremetal. The requirements for the Jumphost become slightly different with VM nodes. The required RAM increases to 24GB when using virtual. Usage: "./deploy.sh -virtual". JIRA: BGS-31 Change-Id: I2e5e60cc7913f4d3efaa405950e1fcbbefd2771b Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-05-04Adds NAT capability and other fixes for deploy.shTim Rozet1-6/+48
Dynamically detects if Admin network interface does not have internet access. If not, then the VM sets up NAT to the public interface so that nodes may PXE boot over the Admin network and download packages during install. Also contains other various fixes. JIRA: BGS-31 Change-Id: I551e0f73e349890e643f477b6b4ac7b3dc84c605 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-04-17Includes fixes that remove need for interface hardcoding and addsTim Rozet1-7/+18
support for Foreman REST API access Changes include: - No more requirement to provide ovs_tunnel_if or storage_iface as hardcoded interface names. private_network and storage_network are now dynamically figured out and resolve to the interface names during puppet module runtime - Adds some code to modify the Foreman API variable. This is used for REST API access to rebuild the nodes and control Foreman via Khaleesi JIRA: BGS-31 Change-Id: I9a3a6590c3b9801e026a6f333782d04d9e2eff6f Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-04-16Adds support for subnets other than /24 and fixes issue where default_gwTim Rozet1-8/+34
was set in the wrong place PATCHSET2: Fixes improper spacing in network_type for .yaml settings Correct subnet is now detected . This was needed for Intel Pod1, but can be used in other environments. Vagrantfile is now updated to add this correct netmask, and variables are updated with correct netmask as well. default_gw was being set before the base_config was copied, so we were losing the value of the variable. Moved this statement to be after base_config. JIRA: BGS-31 Change-Id: I36c69abf5e687fe19a92a9659b2069e1f32275a8 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-04-14Adds deploy.sh for Foreman/QuickStackTim Rozet1-0/+402
PATCHSET2: Fixes whitespace issue and adds default_gw substitution in ksgen settings file Creates a Vagrant VM provisioned with VirtualBox. The Vagrantfile config is modified at runtime with dynamic support for baremetal network setup. IP addresses and other network info are gathered at runtime and passed to the .yaml file which is fed into Khaleesi to install Foreman/QuickStack and provision hosts. For the script usage it is recommended to include the following inside of the yaml file set: - mac_address: "01:23:45:67:89:AB" <-Mac Address of admin interface - bmc_ip: 10.4.17.2 - bmc_mac: "01:23:45:67:88:AB" - bmc_user: root - bmc_pass: root JIRA: BGS-31 Change-Id: I1aa9352d2f5965befabf86119c0c9c5edb82f329 Signed-off-by: Tim Rozet <trozet@redhat.com>
2015-03-01ci: Initial setup of ci treeJoseph Gasparakis1-0/+0
This patch creates some tree structure based on Fatih Deqirmenci's suggestion: genesis ├── common │ ├── manifests │ ├── tools │ └── ci ├── foreman │ ├── tools │ │ └── foo.sh │ └── ci │ ├── deploy.sh │ └── build.sh ├── fuel │ ├── tools │ │ └── foo.sh │ └── ci │ ├── deploy.sh │ └── build.sh └── opensteak ├── tools │ └── foo.sh └── ci ├── deploy.sh └── build.sh So far creating only the deploy and build scripts. Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com>