Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add rough outline of nodepool config & files to source control
- Loading branch information
1 parent
c860f44
commit e165712
Showing
4 changed files
with
178 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| General Nodepool configuration information can be found at http://docs.openstack.org/infra/nodepool/ | ||
|
|
||
| For Pulp's usage of nodepool an assumption is made that nodepool has been installed with | ||
| a user named 'nodepool'. As pip install or source install does not create a systemctl | ||
| service to start/stop nodepool a service definition is in this directory 'nodepoold.service' | ||
|
|
||
| The nodepool config expects a 'scripts' directory containing the script used to | ||
| setup base image for use as nodes. The base script that pulp has been using is | ||
| contained here at prepare_node.sh | ||
|
|
||
| The nodepool.yaml is a sample and will require significant editing to fill in the | ||
| credentials & proper directories on any new nodepool server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| elements-dir: /usr/share/diskimage-builder/elements/ | ||
| script-dir: /home/nodepool/scripts/ | ||
| images-dir: /home/nodepool/images/ | ||
|
|
||
| dburi: 'postgresql:///nodepool' | ||
|
|
||
| zmq-publishers: | ||
| - tcp://<jenkins-master-hostname>:8881 | ||
|
|
||
| labels: | ||
| - name: f21-np | ||
| image: f21-np | ||
| min-ready: 1 | ||
| providers: | ||
| - name: qeos | ||
| - name: f22-np | ||
| image: f22-np | ||
| min-ready: 1 | ||
| providers: | ||
| - name: qeos | ||
| - name: rhel5-np | ||
| image: rhel5-np | ||
| min-ready: 1 | ||
| providers: | ||
| - name: qeos | ||
| - name: rhel6-np | ||
| image: rhel6-np | ||
| min-ready: 1 | ||
| providers: | ||
| - name: qeos | ||
| - name: rhel7-np | ||
| image: rhel7-np | ||
| min-ready: 1 | ||
| providers: | ||
| - name: qeos | ||
|
|
||
| providers: | ||
| - name: qeos | ||
| username: '<openstack username>' | ||
| password: '<openstack password>' | ||
| auth-url: '<openstack auth auth url>' | ||
| project-id: '<openstack project name>' | ||
| max-servers: 40 | ||
| boot-timeout: 240 | ||
| launch-timeout: 900 | ||
| images: | ||
| - name: f20-np | ||
| base-image: Fedora-x86_64-20-20140407 | ||
| user: jenkins | ||
| setup: prepare_node.sh | ||
| private-key: /home/nodepool/.ssh/id_pulp_rsa | ||
| min-ram: 4096 | ||
| - name: f21-np | ||
| base-image: Fedora-Cloud-Base-20141203-21.x86_64 | ||
| user: jenkins | ||
| setup: prepare_node.sh | ||
| private-key: /home/nodepool/.ssh/id_pulp_rsa | ||
| min-ram: 3072 | ||
| - name: f22-np | ||
| base-image: Fedora-Cloud-Base-22-20150521.x86_64 | ||
| user: jenkins | ||
| setup: prepare_node.sh | ||
| private-key: /home/nodepool/.ssh/id_pulp_rsa | ||
| min-ram: 3072 | ||
| - name: rhel5-np | ||
| base-image: RHEL-x86_64-5.10-20140827 | ||
| user: jenkins | ||
| setup: prepare_node.sh | ||
| private-key: /home/nodepool/.ssh/id_pulp_rsa | ||
| min-ram: 4096 | ||
| - name: rhel6-np | ||
| base-image: RHEL-6.7-Server-x86_64-released | ||
| user: jenkins | ||
| setup: prepare_node.sh | ||
| private-key: /home/nodepool/.ssh/id_pulp_rsa | ||
| min-ram: 4096 | ||
| - name: rhel7-np | ||
| base-image: RHEL-x86_64-7.0-20140506 | ||
| user: jenkins | ||
| setup: prepare_node.sh | ||
| private-key: /home/nodepool/.ssh/id_pulp_rsa | ||
| min-ram: 4096 | ||
|
|
||
| targets: | ||
| - name: pulp-jenkins | ||
| jenkins: | ||
| url: https://pulp-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/ | ||
| user: <jenkins admin user> | ||
| apikey: <jenkins admin user api key> | ||
| credentials-id: 044c0620-d67e-4172-9814-dc49e443e7b6 | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [Unit] | ||
| Description=nodepoold | ||
|
|
||
| [Service] | ||
| Type=simple | ||
| ExecStart=/bin/nodepoold -d | ||
| User=nodepool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| #!/usr/bin/env bash | ||
| echo "Disable selinux" | ||
| # This will fail on el5 as selinux isn't installed on the base image | ||
| sudo setenforce 0 | ||
|
|
||
| # Fail immediately on error | ||
| set -e | ||
| set -x | ||
|
|
||
|
|
||
| echo "Performaing a general update" | ||
| sudo yum update -y | ||
|
|
||
| echo "Installing Puppet" | ||
| sudo yum install -y git | ||
| sudo yum install -y redhat-lsb | ||
|
|
||
| echo "Installing java as multiple versions makes this hard for puppet" | ||
| sudo yum install -y java | ||
|
|
||
| OS_NAME=$(lsb_release -si) | ||
| OS_VERSION=$(lsb_release -sr | cut -f1 -d.) | ||
| if [ "$OS_NAME" == "RedHatEnterpriseServer" ] && [ "$OS_VERSION" == "5" ]; then | ||
| sudo rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-5.noarch.rpm | ||
| cat > mrg.repo<< EndOfMessage | ||
| [mrg-el5] | ||
| name=mrg-el5 | ||
| baseurl=http://download.devel.redhat.com/cds/prod/content/dist/rhel/server/5/5Server/x86_64/mrg-m/2/os/ | ||
| enabled=1 | ||
| gpgcheck=0 | ||
| EndOfMessage | ||
| sudo mv mrg.repo /etc/yum.repos.d/ | ||
| elif [ "$OS_NAME" == "RedHatEnterpriseServer" ] && [ "$OS_VERSION" == "6" ]; then | ||
| sudo rpm -ivh http://download-i2.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | ||
| sudo rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm | ||
| elif [ "$OS_NAME" == "RedHatEnterpriseServer" ] && [ "$OS_VERSION" == "7" ]; then | ||
| sudo rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm | ||
| elif [ "$OS_NAME" == "Fedora" ] && [ "$OS_VERSION" == "19" ]; then | ||
| sudo rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-fedora-19.noarch.rpm | ||
| sudo yum install -y hiera | ||
| fi | ||
|
|
||
| sudo yum install -y puppet | ||
|
|
||
| echo "Installing packaging repository" | ||
| git clone https://github.com/pulp/pulp_packaging.git | ||
|
|
||
| echo "Installing required puppet modules" | ||
| sudo puppet module install --verbose --force puppetlabs-stdlib | ||
| sudo puppet module install --verbose --force puppetlabs-mongodb | ||
| sudo puppet module install --verbose --force ripienaar-module_data | ||
| sudo puppet module install --verbose --force dprince-qpid | ||
| sudo puppet module install --verbose --force saz-sudo | ||
|
|
||
| echo "Disable ttysudo requirement" | ||
| sudo sed -i 's|Defaults[ ]*requiretty|#Defaults requiretty|g' /etc/sudoers | ||
|
|
||
| echo "Configuring jenkins_node_setup user" | ||
| sudo puppet apply pulp_packaging/ci/deploy/utils/puppet/jenkins_node_setup.pp | ||
|
|
||
| echo "Configuring pulp-unittest" | ||
| sudo puppet apply pulp_packaging/ci/deploy/utils/puppet/pulp-unittest.pp | ||
|
|
||
| if [ "$OS_NAME" == "RedHatEnterpriseServer" ] && [ "$OS_VERSION" == "6" ]; then | ||
| echo "cleaning up rhel6" | ||
| sudo rm -f /etc/udev/rules.d/70* | ||
| sudo sed -i '/^\(HWADDR)\|UUID\)=/d' /etc/sysconfig/network-scripts/ifcfg-eth0 | ||
| fi |