summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jjb/yaml/pippiandcarlos.com/ob-ctl.yaml36
-rw-r--r--jjb/yaml/pippiandcarlos.com/ob-deploy-branch.yaml4
-rw-r--r--jjb/yaml/verizoncloudplatform.com/ob-ctl.yaml36
-rw-r--r--jjb/yaml/verizoncloudplatform.com/ob-deploy-branch.yaml4
-rw-r--r--pillar/openbook/ansible.sls32
-rw-r--r--salt/openbook/ansible/files/inventory_json.rb2
-rw-r--r--salt/openbook/ci/files/openbookctl6
7 files changed, 112 insertions, 8 deletions
diff --git a/jjb/yaml/pippiandcarlos.com/ob-ctl.yaml b/jjb/yaml/pippiandcarlos.com/ob-ctl.yaml
index 47a73bb..50954b6 100644
--- a/jjb/yaml/pippiandcarlos.com/ob-ctl.yaml
+++ b/jjb/yaml/pippiandcarlos.com/ob-ctl.yaml
@@ -12,6 +12,15 @@
branch: "unstable"
action: "restart"
- "ob-ctl-{action}-{branch}":
+ branch: "unstable_db"
+ action: "stop"
+ - "ob-ctl-{action}-{branch}":
+ branch: "unstable_db"
+ action: "start"
+ - "ob-ctl-{action}-{branch}":
+ branch: "unstable_db"
+ action: "restart"
+ - "ob-ctl-{action}-{branch}":
branch: "develop"
action: "stop"
- "ob-ctl-{action}-{branch}":
@@ -21,6 +30,15 @@
branch: "develop"
action: "restart"
- "ob-ctl-{action}-{branch}":
+ branch: "develop_db"
+ action: "stop"
+ - "ob-ctl-{action}-{branch}":
+ branch: "develop_db"
+ action: "start"
+ - "ob-ctl-{action}-{branch}":
+ branch: "develop_db"
+ action: "restart"
+ - "ob-ctl-{action}-{branch}":
branch: "stage"
action: "stop"
- "ob-ctl-{action}-{branch}":
@@ -30,6 +48,15 @@
branch: "stage"
action: "restart"
- "ob-ctl-{action}-{branch}":
+ branch: "stage_db"
+ action: "stop"
+ - "ob-ctl-{action}-{branch}":
+ branch: "stage_db"
+ action: "start"
+ - "ob-ctl-{action}-{branch}":
+ branch: "stage_db"
+ action: "restart"
+ - "ob-ctl-{action}-{branch}":
branch: "master"
action: "stop"
- "ob-ctl-{action}-{branch}":
@@ -38,6 +65,15 @@
- "ob-ctl-{action}-{branch}":
branch: "master"
action: "restart"
+ - "ob-ctl-{action}-{branch}":
+ branch: "master_db"
+ action: "stop"
+ - "ob-ctl-{action}-{branch}":
+ branch: "master_db"
+ action: "start"
+ - "ob-ctl-{action}-{branch}":
+ branch: "master_db"
+ action: "restart"
- job-template:
name: "ob-ctl-{action}-{branch}"
diff --git a/jjb/yaml/pippiandcarlos.com/ob-deploy-branch.yaml b/jjb/yaml/pippiandcarlos.com/ob-deploy-branch.yaml
index f4ff495..3fa81ce 100644
--- a/jjb/yaml/pippiandcarlos.com/ob-deploy-branch.yaml
+++ b/jjb/yaml/pippiandcarlos.com/ob-deploy-branch.yaml
@@ -3,9 +3,13 @@
name: "ob-deploy-branch"
branch:
- "unstable"
+ - "unstable_db"
- "develop"
+ - "develop_db"
- "stage"
+ - "stage_db"
- "master"
+ - "master_db"
jobs:
- "ob-deploy-branch-{branch}"
diff --git a/jjb/yaml/verizoncloudplatform.com/ob-ctl.yaml b/jjb/yaml/verizoncloudplatform.com/ob-ctl.yaml
index 0be8ad8..81a530a 100644
--- a/jjb/yaml/verizoncloudplatform.com/ob-ctl.yaml
+++ b/jjb/yaml/verizoncloudplatform.com/ob-ctl.yaml
@@ -12,6 +12,15 @@
branch: "unstable"
action: "restart"
- "ob-ctl-{action}-{branch}":
+ branch: "unstable_db"
+ action: "stop"
+ - "ob-ctl-{action}-{branch}":
+ branch: "unstable_db"
+ action: "start"
+ - "ob-ctl-{action}-{branch}":
+ branch: "unstable_db"
+ action: "restart"
+ - "ob-ctl-{action}-{branch}":
branch: "develop"
action: "stop"
- "ob-ctl-{action}-{branch}":
@@ -21,6 +30,15 @@
branch: "develop"
action: "restart"
- "ob-ctl-{action}-{branch}":
+ branch: "develop_db"
+ action: "stop"
+ - "ob-ctl-{action}-{branch}":
+ branch: "develop_db"
+ action: "start"
+ - "ob-ctl-{action}-{branch}":
+ branch: "develop_db"
+ action: "restart"
+ - "ob-ctl-{action}-{branch}":
branch: "stage"
action: "stop"
- "ob-ctl-{action}-{branch}":
@@ -30,6 +48,15 @@
branch: "stage"
action: "restart"
- "ob-ctl-{action}-{branch}":
+ branch: "stage_db"
+ action: "stop"
+ - "ob-ctl-{action}-{branch}":
+ branch: "stage_db"
+ action: "start"
+ - "ob-ctl-{action}-{branch}":
+ branch: "stage_db"
+ action: "restart"
+ - "ob-ctl-{action}-{branch}":
branch: "master"
action: "stop"
- "ob-ctl-{action}-{branch}":
@@ -38,6 +65,15 @@
- "ob-ctl-{action}-{branch}":
branch: "master"
action: "restart"
+ - "ob-ctl-{action}-{branch}":
+ branch: "master_db"
+ action: "stop"
+ - "ob-ctl-{action}-{branch}":
+ branch: "master_db"
+ action: "start"
+ - "ob-ctl-{action}-{branch}":
+ branch: "master_db"
+ action: "restart"
- job-template:
name: "ob-ctl-{action}-{branch}"
diff --git a/jjb/yaml/verizoncloudplatform.com/ob-deploy-branch.yaml b/jjb/yaml/verizoncloudplatform.com/ob-deploy-branch.yaml
index d2b41bc..baf74dc 100644
--- a/jjb/yaml/verizoncloudplatform.com/ob-deploy-branch.yaml
+++ b/jjb/yaml/verizoncloudplatform.com/ob-deploy-branch.yaml
@@ -3,9 +3,13 @@
name: "ob-deploy-branch"
branch:
- "unstable"
+ - "unstable_db"
- "develop"
+ - "develop_db"
- "stage"
+ - "stage_db"
- "master"
+ - "master_db"
jobs:
- "ob-deploy-branch-{branch}"
diff --git a/pillar/openbook/ansible.sls b/pillar/openbook/ansible.sls
index 25d5ba4..aa98e8a 100644
--- a/pillar/openbook/ansible.sls
+++ b/pillar/openbook/ansible.sls
@@ -195,30 +195,54 @@ ansible:
mode: "0644"
relative_to_buildroot: True
is_template: False
- inventory_json__unstable_rb:
+ inventory_json_unstable_rb:
name: inventory_json_unstable.rb
source: inventory_json.rb
mode: "0755"
relative_to_buildroot: True
is_template: False
- inventory_json__develop_rb:
+ inventory_json_unstable_db_rb:
+ name: inventory_json_unstable_db.rb
+ source: inventory_json.rb
+ mode: "0755"
+ relative_to_buildroot: True
+ is_template: False
+ inventory_json_develop_rb:
name: inventory_json_develop.rb
source: inventory_json.rb
mode: "0755"
relative_to_buildroot: True
is_template: False
- inventory_json__stage_rb:
+ inventory_json_develop_db_rb:
+ name: inventory_json_develop_db.rb
+ source: inventory_json.rb
+ mode: "0755"
+ relative_to_buildroot: True
+ is_template: False
+ inventory_json_stage_rb:
name: inventory_json_stage.rb
source: inventory_json.rb
mode: "0755"
relative_to_buildroot: True
is_template: False
- inventory_json__master_rb:
+ inventory_json_stage_db_rb:
+ name: inventory_json_stage_db.rb
+ source: inventory_json.rb
+ mode: "0755"
+ relative_to_buildroot: True
+ is_template: False
+ inventory_json_master_rb:
name: inventory_json_master.rb
source: inventory_json.rb
mode: "0755"
relative_to_buildroot: True
is_template: False
+ inventory_json_master_db_rb:
+ name: inventory_json_master_db.rb
+ source: inventory_json.rb
+ mode: "0755"
+ relative_to_buildroot: True
+ is_template: False
ob_deploy_branch_sh:
name: ob-deploy-branch.sh
source: ob-deploy-branch.sh
diff --git a/salt/openbook/ansible/files/inventory_json.rb b/salt/openbook/ansible/files/inventory_json.rb
index e4a5938..4a41f97 100644
--- a/salt/openbook/ansible/files/inventory_json.rb
+++ b/salt/openbook/ansible/files/inventory_json.rb
@@ -10,7 +10,7 @@ def doit()
exit(1)
end
environ = ""
- ["unstable", "develop", "stage", "master"].each do |env|
+ ["unstable_db", "unstable", "develop_db", "develop", "stage_db", "stage", "master_db", "master"].each do |env|
if File.basename($0).include?(env)
environ = env
break
diff --git a/salt/openbook/ci/files/openbookctl b/salt/openbook/ci/files/openbookctl
index 6a8aa5e..0296882 100644
--- a/salt/openbook/ci/files/openbookctl
+++ b/salt/openbook/ci/files/openbookctl
@@ -9,7 +9,7 @@ wait_for_database() {
echo "Waiting for database to start..."
started=1
for i in {120..0}; do
- if echo 'SELECT 1' | mysql -h 127.0.0.1 -u root --password='{% raw %}{{ openbook_database_password }}{% endraw %}' &>/dev/null; then
+ if echo 'SELECT 1' | mysql -h {% raw %}{{ ansible_default_ipv4.address }}{% endraw %} -u root --password='{% raw %}{{ openbook_database_password }}{% endraw %}' &>/dev/null; then
started=0
break
fi
@@ -22,9 +22,9 @@ wait_for_database() {
}
ensure_openbook_databases_created() {
- if ! echo "SHOW DATABASES;" | mysql -h 127.0.0.1 -u root --password='{% raw %}{{ openbook_database_password }}{% endraw %}' 2>/dev/null | fgrep 'openbook'; then
+ if ! echo "SHOW DATABASES;" | mysql -h {% raw %}{{ ansible_default_ipv4.address }}{% endraw %} -u root --password='{% raw %}{{ openbook_database_password }}{% endraw %}' 2>/dev/null | fgrep 'openbook'; then
echo "Creating Openbook schema..."
- mysql -h 127.0.0.1 -u root --password='{% raw %}{{ openbook_database_password }}{% endraw %}' &>/dev/null < {{ pillar["database"]["files"]["create_openbook_schemas"]["path"] }}/{{ pillar["database"]["files"]["create_openbook_schemas"]["name"] }}
+ mysql -h {% raw %}{{ ansible_default_ipv4.address }}{% endraw %} -u root --password='{% raw %}{{ openbook_database_password }}{% endraw %}' &>/dev/null < {{ pillar["database"]["files"]["create_openbook_schemas"]["path"] }}/{{ pillar["database"]["files"]["create_openbook_schemas"]["name"] }}
fi
}
{% raw %}{% endif %}{% endraw %}