summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Morgan <jack.morgan@intel.com>2018-01-09 00:12:54 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-09 00:12:54 +0000
commit9909c37d5866f1c760fe9f4ec47616c49fcddee3 (patch)
tree67dbe96f230778dffb71095a69c084d682c3f724
parent3a50e126998d7686d9c51c0940830d3ae9c88373 (diff)
parent786079a1057edd45cd5b929b75d7d2f968d6e4e6 (diff)
Merge "Adds workflows to deploy and clean hosts"
-rw-r--r--laas-fog/pharoslaas/actions/clean-workflow.yaml31
-rw-r--r--laas-fog/pharoslaas/actions/deployment_workflow.yaml39
-rw-r--r--laas-fog/pharoslaas/actions/workflows/clean-workflow.yaml16
-rw-r--r--laas-fog/pharoslaas/actions/workflows/deployment_workflow.yaml47
4 files changed, 133 insertions, 0 deletions
diff --git a/laas-fog/pharoslaas/actions/clean-workflow.yaml b/laas-fog/pharoslaas/actions/clean-workflow.yaml
new file mode 100644
index 0000000..cc93afb
--- /dev/null
+++ b/laas-fog/pharoslaas/actions/clean-workflow.yaml
@@ -0,0 +1,31 @@
+---
+##############################################################################
+# Copyright 2017 Parker Berberian and Others #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+##############################################################################
+
+name: "clean-workflow"
+runner_type: "action-chain"
+description: "This workflow cleans a host after a deployment"
+entry_point: "workflows/clean-workflow.yaml"
+enabled: true
+parameters:
+ host:
+ type: "string"
+ required: true
+ description: "hostname of host to be cleaned"
+ key:
+ type: "string"
+ required: false
+ description: "st2 key of vpn user to delete"
diff --git a/laas-fog/pharoslaas/actions/deployment_workflow.yaml b/laas-fog/pharoslaas/actions/deployment_workflow.yaml
new file mode 100644
index 0000000..659b7e2
--- /dev/null
+++ b/laas-fog/pharoslaas/actions/deployment_workflow.yaml
@@ -0,0 +1,39 @@
+---
+##############################################################################
+# Copyright 2017 Parker Berberian and Others #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+##############################################################################
+
+description: This is the workflow that will provision the host as requested.
+enabled: true
+runner_type: mistral-v2
+entry_point: workflows/deployment_workflow.yaml
+name: deployment_workflow
+pack: pharoslaas
+parameters:
+ installer:
+ required: true
+ type: string
+ host:
+ required: true
+ type: string
+ scenario:
+ required: false
+ type: string
+ os:
+ required: false
+ type: string
+ booking:
+ required: false
+ type: string
diff --git a/laas-fog/pharoslaas/actions/workflows/clean-workflow.yaml b/laas-fog/pharoslaas/actions/workflows/clean-workflow.yaml
new file mode 100644
index 0000000..c0a13e7
--- /dev/null
+++ b/laas-fog/pharoslaas/actions/workflows/clean-workflow.yaml
@@ -0,0 +1,16 @@
+---
+chain:
+ -
+ name: "image"
+ ref: "pharoslaas.fog_imageWorkflow"
+ parameters:
+ host: "{{host}}"
+ on-success: "delete_vpn_user"
+
+ -
+ name: "delete_vpn_user"
+ ref: "pharoslaas.vpn_delete_user"
+ parameters:
+ key: "{{key}}"
+
+default: "image"
diff --git a/laas-fog/pharoslaas/actions/workflows/deployment_workflow.yaml b/laas-fog/pharoslaas/actions/workflows/deployment_workflow.yaml
new file mode 100644
index 0000000..c32d60d
--- /dev/null
+++ b/laas-fog/pharoslaas/actions/workflows/deployment_workflow.yaml
@@ -0,0 +1,47 @@
+---
+version: '2.0'
+pharoslaas.deployment_workflow:
+ description: The master workflow to provision, install, deploy hosts
+ input:
+ - host
+ - installer
+ - scenario
+ - os
+ - booking
+ tasks:
+ image_host:
+ action: pharoslaas.fog_imageWorkflow host=<% $.host %> os=<% $.os %>
+ on-success:
+ - install_fuel: <% $.installer = 'Fuel' %>
+ - install_joid: <% $.installer = 'Joid' %>
+ - install_apex: <% $.installer = 'Apex' %>
+ - install_compass: <% $.installer = 'Compass' %>
+ - change_password: <% not $.installer in list('Fuel','Joid','Apex','Compass') %>
+
+ install_fuel:
+ action: pharoslaas.fuel_workflow host=<% $.host %> scenario=<% $.scenario %>
+ on-success:
+ - change_password
+
+ install_joid:
+ action: pharoslaas.joid_workflow host=<% $.host %> scenario=<% $.scenario %>
+ on-success:
+ - change_password
+
+ install_apex:
+ action: pharoslaas.apex_workflow host=<% $.host %> scenario=<% $.scenario %>
+ on-success:
+ - change_password
+
+ install_compass:
+ action: pharoslaas.compass_workflow host=<% $.host %> scenario=<% $.scenario %>
+ on-success:
+ - change_password
+
+ change_password:
+ action: pharoslaas.password_workflow host=<% $.host %>
+ on-success:
+ - make_vpn_user
+
+ make_vpn_user:
+ action: pharoslaas.vpn_make_user booking=<% $.booking %>