This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a2e038
commit d498f90
Showing
7 changed files
with
117 additions
and
355 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
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 |
---|---|---|
@@ -1,12 +1,45 @@ | ||
# | ||
# Cookbook Name:: cookbooks/micro-qa | ||
# Recipe:: deploy | ||
# Recipe:: eutester | ||
# | ||
# Copyright 2014, Eucalyptus Systems | ||
# | ||
# All rights reserved - Do Not Redistribute | ||
# | ||
include_recipe 'micro-qa' | ||
include_recipe 'python' | ||
python_pip 'fabric' | ||
package "git" | ||
include_recipe "micro-qa" | ||
|
||
pip_options = "" | ||
if platform?("redhat", "centos", "fedora") | ||
# code for only redhat family systems. | ||
%w{python-devel python-setuptools gcc git unzip wget}.each do |package_name| | ||
package package_name | ||
end | ||
pip_options = "--pre" | ||
chef_dk_url = 'https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chefdk-0.3.2-1.x86_64.rpm' | ||
chef_dk_rpm = '/root/chef-dk.rpm' | ||
remote_file chef_dk_rpm do | ||
source chef_dk_url | ||
end | ||
yum_package "chef-dk" do | ||
action :install | ||
source chef_dk_rpm | ||
end | ||
elsif platform?("ubuntu", "debian") | ||
# code for debian | ||
%w{python-setuptools gcc python-dev git git wget}.each do |package_name| | ||
package package_name | ||
end | ||
chef_dk_url = 'http://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.3.2-1_amd64.deb' | ||
chef_dk_deb = '/root/chef-dk.deb' | ||
remote_file chef_dk_deb do | ||
source chef_dk_url | ||
end | ||
dpkg_package "chef-dk" do | ||
action :install | ||
source chef_dk_deb | ||
end | ||
end | ||
|
||
python_pip "fabric" | ||
python_pip "PyYAML" | ||
|
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 |
---|---|---|
|
@@ -271,7 +271,7 @@ The will run once per minute and up to the number defined in the concurrent jobs | |
</listView> | ||
<hudson.plugins.sectioned__view.SectionedView plugin="[email protected]"> | ||
<owner class="hudson" reference="../../.."/> | ||
<name>Provisioning</name> | ||
<name>Deploy Eucalyptus</name> | ||
<description><html>
 | ||
<head>
 | ||
<title></title>
 | ||
|
@@ -292,8 +292,6 @@ The will run once per minute and up to the number defined in the concurrent jobs | |
<div style="font-family: Verdana, Helvetica, 'sans serif'; font-size: 11px; background-color: rgb(255, 255, 255);">
 | ||
<font size="5">Steps to deploy Eucalyptus</font></div>
 | ||
<ol>
 | ||
<li style="font-family: Verdana, Helvetica, 'sans serif'; font-size: 11px; background-color: rgb(255, 255, 255);">
 | ||
<span style="font-size:16px;">Upload your SSH keys or set the default password for the nodes you wish to run Eucalyptus on</span></li>
 | ||
<li style="font-family: Verdana, Helvetica, 'sans serif'; font-size: 11px; background-color: rgb(255, 255, 255);">
 | ||
<span style="font-size:16px;">Run the Deploy job</span></li>
 | ||
<li style="font-family: Verdana, Helvetica, 'sans serif'; font-size: 11px; background-color: rgb(255, 255, 255);">
 | ||
|
@@ -315,26 +313,6 @@ The will run once per minute and up to the number defined in the concurrent jobs | |
<hudson.plugins.sectioned__view.ListViewSection> | ||
<jobNames> | ||
<comparator class="hudson.util.CaseInsensitiveComparator"/> | ||
<string>Set default password</string> | ||
<string>Upload Host Keypair</string> | ||
</jobNames> | ||
<jobFilters/> | ||
<name>Administrate</name> | ||
<width>FULL</width> | ||
<alignment>CENTER</alignment> | ||
<columns> | ||
<hudson.views.StatusColumn/> | ||
<hudson.views.JobColumn/> | ||
<hudson.views.LastSuccessColumn/> | ||
<hudson.views.LastFailureColumn/> | ||
<hudson.views.LastDurationColumn/> | ||
<hudson.views.BuildButtonColumn/> | ||
<jenkins.plugins.extracolumns.LastBuildConsoleColumn plugin="[email protected]"/> | ||
</columns> | ||
</hudson.plugins.sectioned__view.ListViewSection> | ||
<hudson.plugins.sectioned__view.ListViewSection> | ||
<jobNames> | ||
<comparator class="hudson.util.CaseInsensitiveComparator" reference="../../../hudson.plugins.sectioned__view.ListViewSection/jobNames/comparator"/> | ||
<string>Deploy</string> | ||
</jobNames> | ||
<jobFilters/> | ||
|
@@ -348,26 +326,7 @@ The will run once per minute and up to the number defined in the concurrent jobs | |
<hudson.views.LastFailureColumn/> | ||
<hudson.views.LastDurationColumn/> | ||
<hudson.views.BuildButtonColumn/> | ||
<jenkins.plugins.extracolumns.LastBuildConsoleColumn plugin="[email protected]"/> | ||
</columns> | ||
</hudson.plugins.sectioned__view.ListViewSection> | ||
<hudson.plugins.sectioned__view.ListViewSection> | ||
<jobNames> | ||
<comparator class="hudson.util.CaseInsensitiveComparator" reference="../../../hudson.plugins.sectioned__view.ListViewSection/jobNames/comparator"/> | ||
<string>Rebuild</string> | ||
</jobNames> | ||
<jobFilters/> | ||
<name>Rebuild</name> | ||
<width>FULL</width> | ||
<alignment>CENTER</alignment> | ||
<columns> | ||
<hudson.views.StatusColumn/> | ||
<hudson.views.JobColumn/> | ||
<hudson.views.LastSuccessColumn/> | ||
<hudson.views.LastFailureColumn/> | ||
<hudson.views.LastDurationColumn/> | ||
<hudson.views.BuildButtonColumn/> | ||
<jenkins.plugins.extracolumns.LastBuildConsoleColumn plugin="[email protected]"/> | ||
<jenkins.plugins.extracolumns.LastBuildConsoleColumn plugin="[email protected]"/> | ||
</columns> | ||
</hudson.plugins.sectioned__view.ListViewSection> | ||
</sections> | ||
|
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 |
---|---|---|
|
@@ -27,64 +27,71 @@ | |
<properties> | ||
<hudson.model.ParametersDefinitionProperty> | ||
<parameterDefinitions> | ||
<hudson.model.BooleanParameterDefinition> | ||
<name>nuke_before_deploy</name> | ||
<description></description> | ||
<defaultValue>false</defaultValue> | ||
</hudson.model.BooleanParameterDefinition> | ||
<hudson.model.TextParameterDefinition> | ||
<name>environment</name> | ||
<name>config</name> | ||
<description><font size="3" color="blue"> | ||
<a href="https://github.com/eucalyptus/eucalyptus-cookbook/blob/master/environments/edge-nightly.json"> | ||
Sample environment</a> | ||
<a href="https://github.com/eucalyptus/eucalyptus-cookbook/blob/testing/attributes/default.rb"> | ||
For possible attributes that can be set look here.</a> | ||
</font></description> | ||
<defaultValue>{ | ||
"name": "edge-nightly", | ||
"description": "4.0 Nightlies EDGE Testing", | ||
"json_class": "Chef::Environment", | ||
"chef_type": "environment", | ||
"default_attributes": { | ||
"eucalyptus": { | ||
"network": { "public-ips": "REQUIRED"}, | ||
"topology": { | ||
"clc-1": "<CLC-IP>", | ||
"walrus": "<WALRUS-IP>", | ||
"user-facing": ["<UFS-IP>"], | ||
"clusters": { | ||
"default": { | ||
"cc-1": "<CC-IP>", | ||
"sc-1": "<SC-IP>", | ||
"nodes": "<NC-IP>" | ||
} | ||
} | ||
}, | ||
"eucalyptus-repo": "http://downloads.eucalyptus.com/software/eucalyptus/4.0/centos/6/x86_64/", | ||
"euca2ools-repo": "http://downloads.eucalyptus.com/software/euca2ools/3.1/centos/6/x86_64/" | ||
} | ||
} | ||
} | ||
</defaultValue> | ||
</hudson.model.TextParameterDefinition> | ||
<hudson.model.TextParameterDefinition> | ||
<name>bootstrap</name> | ||
<description><font size="3" color="blue"> | ||
<a href="https://github.com/eucalyptus/eucalyptus-cookbook/blob/master/bootstrap.json"> | ||
Sample bootstrap</a> | ||
</font></description> | ||
<defaultValue>{ | ||
"nodes": [ | ||
{ | ||
"groups": ["cloud::full","node::default"], | ||
"hosts": ["<YOUR MACHINE IP>"] | ||
} | ||
] | ||
}</defaultValue> | ||
<defaultValue>--- | ||
name: basic-config | ||
description: Basic Deployment | ||
default_attributes: | ||
eucalyptus: | ||
topology: | ||
clc-1: <ENTER-MACHINE-IP> | ||
walrus: <ENTER-MACHINE-IP> | ||
user-facing: | ||
- <ENTER-MACHINE-IP> | ||
clusters: | ||
one: | ||
cc-1: <ENTER-MACHINE-IP> | ||
sc-1: <ENTER-MACHINE-IP> | ||
### Node Controller list looks like: 192.168.0.1 192.168.0.2 192.168.0.3 | ||
nodes: <ENTER-MACHINE-IPS-SPACE-SEPERATED-STRING> | ||
network: | ||
public-ips: <ENTER-PUBLIC-IPS-RANGE> | ||
public-interface: br0 | ||
private-interface: br0 | ||
### Name of bridge to create on NCs | ||
bridge-interface: br0 | ||
### This is the interface on the NCs to attach the bridge to | ||
bridged-nic: eth0</defaultValue> | ||
</hudson.model.TextParameterDefinition> | ||
</parameterDefinitions> | ||
</hudson.model.ParametersDefinitionProperty> | ||
<hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="[email protected]"> | ||
<com.sonyericsson.rebuild.RebuildSettings plugin="[email protected]"> | ||
<autoRebuild>false</autoRebuild> | ||
</com.sonyericsson.rebuild.RebuildSettings> | ||
<hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="[email protected]"> | ||
<maxConcurrentPerNode>0</maxConcurrentPerNode> | ||
<maxConcurrentTotal>0</maxConcurrentTotal> | ||
<throttleEnabled>false</throttleEnabled> | ||
<throttleOption>project</throttleOption> | ||
</hudson.plugins.throttleconcurrents.ThrottleJobProperty> | ||
<hudson.plugins.disk__usage.DiskUsageProperty plugin="[email protected]"/> | ||
</properties> | ||
<scm class="hudson.scm.NullSCM"/> | ||
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]"> | ||
<configVersion>2</configVersion> | ||
<userRemoteConfigs> | ||
<hudson.plugins.git.UserRemoteConfig> | ||
<url>https://github.com/viglesiasce/euca-deploy.git</url> | ||
</hudson.plugins.git.UserRemoteConfig> | ||
</userRemoteConfigs> | ||
<branches> | ||
<hudson.plugins.git.BranchSpec> | ||
<name>*/master</name> | ||
</hudson.plugins.git.BranchSpec> | ||
</branches> | ||
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> | ||
<submoduleCfg class="list"/> | ||
<extensions/> | ||
</scm> | ||
<canRoam>true</canRoam> | ||
<disabled>false</disabled> | ||
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> | ||
|
@@ -95,37 +102,37 @@ | |
<hudson.tasks.Shell> | ||
<command>#!/bin/bash | ||
|
||
cat > environment.json <<EOF | ||
$environment | ||
cat > config.yml <<EOF | ||
$config | ||
EOF | ||
cat > bootstrap.json <<EOF | ||
$bootstrap | ||
EOF</command> | ||
</hudson.tasks.Shell> | ||
<hudson.tasks.Shell> | ||
<command>#!/usr/bin/python | ||
import json | ||
|
||
environment = json.loads(open('environment.json').read()) | ||
name = open('environment-name','w') | ||
name.write(environment['name']) | ||
name.close()</command> | ||
</hudson.tasks.Shell> | ||
<hudson.tasks.Shell> | ||
<command>#!/bin/bash | ||
source /etc/profile.d/rbenv.sh | ||
ENV_NAME=`cat environment-name` | ||
mb environment unlock $ENV_NAME | ||
mb environment destroy --force $ENV_NAME | ||
mb environment from environment.json | ||
mb eucalyptus bootstrap bootstrap.json -v -e $ENV_NAME -c /root/.mb/config.json</command> | ||
mkdir -p chef-repo | ||
pushd chef-repo | ||
|
||
if [ ! -d "eucalyptus-cookbook" ]; then | ||
git clone https://github.com/eucalyptus/eucalyptus-cookbook.git -b testing | ||
fi | ||
pushd eucalyptus-cookbook | ||
berks vendor $WORKSPACE/chef-repo/cookbooks | ||
popd | ||
|
||
mkdir -p nodes | ||
mkdir -p environments | ||
popd | ||
|
||
if $nuke_before_deploy; then | ||
$uninstall = 'uninstall' | ||
fi | ||
|
||
fab $uninstall full_install --parallel --pool-size 20 -p foobar --show=everything</command> | ||
</hudson.tasks.Shell> | ||
</builders> | ||
<publishers/> | ||
<buildWrappers> | ||
<hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.16"> | ||
<hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.24"> | ||
<deleteDirs>false</deleteDirs> | ||
<cleanupParameter></cleanupParameter> | ||
<externalDelete></externalDelete> | ||
</hudson.plugins.ws__cleanup.PreBuildCleanup> | ||
</buildWrappers> | ||
</project> |
Oops, something went wrong.