forked from oracle-quickstart/oci-oracle-data-integrator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildStack.sh
executable file
·41 lines (37 loc) · 1.16 KB
/
buildStack.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
#
# $Header: odi/src/javadev/odi.release/packaging/odi-oci-stack/buildStack.sh /main/4 2020/11/08 22:16:41 sjayaram Exp $
#
# buildStack.sh
#
# Copyright (c) 2020, Oracle and/or its affiliates.
#
# NAME
# buildStack.sh - <one-line expansion of the name>
#
# DESCRIPTION
# <short description of component this file declares/defines>
#
# NOTES
# <other useful comments, qualifications, etc.>
#
# MODIFIED (MM/DD/YY)
# sjayaram 05/22/20 - Creation
#
# This script builds the odi oci stack.
# It takes a parameter to decide whether to build a BASIC or ADVANCED stack
# Make sure you do a cleanview before running this command
# Usage : buildStack.sh BASIC
sed "s/<studio_mode>/$1/g" ./main.tf.template > main.tf
cat outputs.tf.template > outputs.tf
if [ $1 == "BASIC" ]
then
echo 'output "public_web_studio_url" {
value = "http://${module.odi.node_public_ip}:9999/odi-web-studio"
}' >> outputs.tf
echo '' >> outputs.tf
echo 'output "private_web_studio_url" {
value = "http://${module.odi.node_private_ip}:9999/odi-web-studio"
}' >> outputs.tf
fi
zip -r odi_stack_$1.zip ./* -x "./buildStack.sh" "./*.template" "./*.zip" "*/.*"