-
Notifications
You must be signed in to change notification settings - Fork 21
/
myhero_setup
92 lines (80 loc) · 2.77 KB
/
myhero_setup
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
echo
echo "Thank you for using the MyHero Demo Application."
echo "In order to install it into your Mantl Environment, "
echo "several pieces of information are needed. "
echo
echo Please provide basic details on your Mantl install.
echo
echo "If you do not have a Mantl Environment available you "
echo "can leverage the Cisco DevNet Mantl Sandbox. "
echo "Details can be found at: https://developer.cisco.com/site/mantl/"
echo
echo "You can access the Sandbox at: "
echo " https://mantlsandbox.cisco.com "
echo " user/pass: admin/1vtG@lw@y"
echo
echo "Would you like to leverage the Cisco DevNet Sandbox? yes/no"
read SB
if [ ${SB} == "yes" ]
then
control_address=mantlsandbox.cisco.com
mantl_user=admin
mantl_password=1vtG@lw@y
mantl_domain=app.mantldevnetsandbox.com
control_port=8080
else
echo
echo "What is the address of your Control Servers? "
echo "eg: control.mantl.internet.com"
read control_address
echo
control_port=8080
echo " The default port for Marathon API is 8080. "
echo " Does your deployment use a different port? yes/no"
read ANSWER
if [ ${ANSWER} == "yes" ]
then
echo "What port does Marathon API listen on?"
read control_port
fi
echo
echo "What is the username for your Mantl account? "
read mantl_user
echo
echo "What is the password for your Mantl account? "
read -s mantl_password
echo
echo "What is the Application domain used by Mantl? "
echo " * Also referred to as the Traefik Domain"
read mantl_domain
fi
echo "*******************************************************"
echo "The Mantl Setup Infromation is being saved in this session as "
echo "environment variables. They will be removed as soon "
echo "as you close this terminal session. "
export MANTL_CONTROL="${control_address}:${control_port}"
export MANTL_USER="${mantl_user}"
export MANTL_PASSWORD="${mantl_password}"
export MANTL_DOMAIN="${mantl_domain}"
export TAG="latest"
echo
echo "Now some details on how you want to install MyHero."
echo
echo "What do you want your deployment to be named? "
echo "For example, with a name of \"myhero\", you will visit http://myhero-web.${MANTL_DOMAIN} to view the application"
read deployment_name
echo
export DEPLOYMENT_NAME="${deployment_name}"
echo "*******************************************************"
echo "Basic MyHero Setup Complete! "
echo "If you plan to install the Spark or Tropo services, "
echo "you will need to run the following before moving forward. "
echo " source spark_setup "
echo " source tropo_setup "
echo
echo "Marathon API calls will be sent to: "
echo "https://${MANTL_CONTROL}/"
echo
echo "*******************************************************"
echo "To install MyHero, run ./myhero-install.sh "
echo