Skip to content

Commit

Permalink
Merge pull request #6224 from jtopjian/openstack-mitaka-patches
Browse files Browse the repository at this point in the history
provider/openstack: OpenStack Mitaka Patches
  • Loading branch information
jtopjian committed Apr 20, 2016
2 parents eb49c00 + b70b448 commit 1047df9
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 22 deletions.
36 changes: 22 additions & 14 deletions builtin/providers/openstack/devstack/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
#!/bin/bash

set -e

cd
sudo apt-get update
sudo apt-get install -y git make mercurial

GOPKG=go1.5.2.linux-amd64.tar.gz
wget https://storage.googleapis.com/golang/$GOPKG
sudo tar -xvf $GOPKG -C /usr/local/
sudo wget -O /usr/local/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
sudo chmod +x /usr/local/bin/gimme
gimme 1.6 >> .bashrc

mkdir ~/go
eval "$(/usr/local/bin/gimme 1.6)"
echo 'export GOPATH=$HOME/go' >> .bashrc
echo 'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >> .bashrc
source .bashrc
export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

export PATH=$PATH:$HOME/terraform:$HOME/go/bin
echo 'export PATH=$PATH:$HOME/terraform:$HOME/go/bin' >> .bashrc
source .bashrc

go get github.com/tools/godep
go get github.com/hashicorp/terraform
cd $GOPATH/src/github.com/hashicorp/terraform
make updatedeps
godep restore

cd
git clone https://git.openstack.org/openstack-dev/devstack -b stable/liberty
git clone https://git.openstack.org/openstack-dev/devstack -b stable/mitaka
cd devstack
cat >local.conf <<EOF
[[local|localrc]]
# OpenStack version
OPENSTACK_VERSION="liberty"
OPENSTACK_VERSION="mitaka"
# devstack password
DEVSTACK_PASSWORD="password"
Expand Down Expand Up @@ -68,7 +74,11 @@ enable_service q-metering
enable_service q-lbaas
enable_service q-fwaas
# Disable Tempest
# Enable Trove
enable_plugin trove git://git.openstack.org/openstack/trove.git stable/\$OPENSTACK_VERSION
enable_service trove,tr-api,tr-tmgr,tr-cond
# Disable Temptest
disable_service tempest
# Disable Horizon
Expand All @@ -91,6 +101,7 @@ disable_service horizon
# For more information on Heat and DevStack see
# http://docs.openstack.org/developer/heat/getting_started/on_devstack.html
#IMAGE_URLS+=",http://cloud.fedoraproject.org/fedora-20.x86_64.qcow2"
#IMAGE_URLS+=",https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img"
# Logging
LOGDAYS=1
Expand All @@ -113,13 +124,10 @@ echo export OS_POOL_NAME="public" >> openrc
echo export OS_FLAVOR_ID=99 >> openrc
source openrc demo

cd $GOPATH/src/github.com/hashicorp/terraform
make updatedeps

# Replace the below lines with the repo/branch you want to test
#git remote add jtopjian https://github.com/jtopjian/terraform
#git fetch jtopjian
#git checkout --track jtopjian/openstack-acctest-fixes
#git checkout --track jtopjian/openstack-secgroup-safe-delete
#make testacc TEST=./builtin/providers/openstack TESTARGS='-run=AccBlockStorageV1'
#make testacc TEST=./builtin/providers/openstack TESTARGS='-run=AccCompute'
#make testacc TEST=./builtin/providers/openstack
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ resource "openstack_fw_policy_v1" "accept_test_policy_1" {

const testFirewallConfigUpdated = `
resource "openstack_fw_firewall_v1" "accept_test" {
name = "accept_test"
description = "terraform acceptance test"
policy_id = "${openstack_fw_policy_v1.accept_test_policy_2.id}"
name = "accept_test"
description = "terraform acceptance test"
policy_id = "${openstack_fw_policy_v1.accept_test_policy_2.id}"
admin_state_up = true
}
resource "openstack_fw_policy_v1" "accept_test_policy_2" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ var testAccLBV1Member_basic = fmt.Sprintf(`
pool_id = "${openstack_lb_pool_v1.pool_1.id}"
address = "192.168.199.10"
port = 80
admin_state_up = true
}`)

var testAccLBV1Member_update = fmt.Sprintf(`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,10 @@ var testAccLBV1Pool_fullstack = fmt.Sprintf(`
}
resource "openstack_lb_vip_v1" "vip_1" {
name = "vip_1"
subnet_id = "${openstack_networking_subnet_v2.subnet_1.id}"
protocol = "TCP"
port = 80
pool_id = "${openstack_lb_pool_v1.pool_1.id}"
name = "vip_1"
subnet_id = "${openstack_networking_subnet_v2.subnet_1.id}"
protocol = "TCP"
port = 80
pool_id = "${openstack_lb_pool_v1.pool_1.id}"
admin_state_up = true
}`)
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ var testAccLBV1VIP_basic = fmt.Sprintf(`
protocol = "HTTP"
port = 80
pool_id = "${openstack_lb_pool_v1.pool_1.id}"
admin_state_up = true
persistence {
type = "SOURCE_IP"
}
Expand Down Expand Up @@ -154,5 +155,6 @@ var testAccLBV1VIP_update = fmt.Sprintf(`
persistence {
type = "SOURCE_IP"
}
admin_state_up = true
}`,
OS_REGION_NAME, OS_REGION_NAME, OS_REGION_NAME)

0 comments on commit 1047df9

Please sign in to comment.