commit | author | age
|
bae328
|
1 |
#!/bin/sh |
JR |
2 |
|
|
3 |
# All objects will be created in current namespace. I recommend uncommenting the below line |
|
4 |
# Important - run as a user with the ability to run `oc adm policy add-scc-to-user anyuid` command |
|
5 |
# oc new-project adopt-a-pup |
|
6 |
|
|
7 |
# Process templates |
|
8 |
oc create -f templates/adoption-service-template.yaml |
|
9 |
oc create -f animal-service-template.yaml |
|
10 |
oc create -f email-service-template.yaml |
|
11 |
oc create -f envoy-gateway-template.yaml |
|
12 |
oc create -f notification-service-template.yaml |
|
13 |
oc create -f shelter-service-template.yaml |
|
14 |
|
|
15 |
# Create service account for maildev/email-service pod so it can listen on ports 25 and 80 (25 is default smtp server port) |
|
16 |
oc create serviceaccount maildev |
|
17 |
oc patch dc/email-service --patch '{"spec":{"template":{"spec":{"serviceAccountName": "maildev"}}}}' |
|
18 |
oc adm policy add-scc-to-user anyuid -z maildev |
|
19 |
|
|
20 |
# Create apps |
|
21 |
oc new-app --template=openshift/mongodb-persistent --name=mongodb -e MONGODB_USER=developer -e MONGODB_PASSWORD=developer -e MONGODB_DATABASE=adopt-a-pup -n adopt-a-pup |
|
22 |
oc new-app --name=adoption-service --template=adoption-service |
|
23 |
oc new-app --name=animal-service --template=animal-service |
|
24 |
oc new-app --name=email-service --template=email-service |
|
25 |
oc new-app --name=envoy-gateway --template=envoy-gateway |
|
26 |
oc new-app --name=notification-service --template=notification-service |
|
27 |
oc new-app --name=shelter-service --template=shelter-service |
|
28 |
|