Skip to content
This repository was archived by the owner on May 12, 2022. It is now read-only.

Commit 2291503

Browse files
committed
Prepare APB for v0.1.0
* Update apb parameters * Add parameters and walkthrough to README
1 parent 2bd5394 commit 2291503

File tree

3 files changed

+41
-17
lines changed

3 files changed

+41
-17
lines changed

Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ MDAKICAgIHBhcmFtZXRlcnM6CiAgICAgIC0gbmFtZTogbmdpbnhfcGx1c19pbWFnZQogICAgICAg\
2525
IGRlZmF1bHQ6IG9wZW5zaGlmdC1uZ2lueC1wbHVzCiAgICAgICAgdHlwZTogc3RyaW5nCiAgICAg\
2626
ICAgdGl0bGU6IE5hbWUgb2YgTkdJTlggUGx1cyBEb2NrZXIgaW1hZ2UKICAgICAgICByZXF1aXJl\
2727
ZDogdHJ1ZQogICAgICAtIG5hbWU6IGxiCiAgICAgICAgZGVmYXVsdDogZmFsc2UKICAgICAgICB0\
28-
eXBlOiBib29sZWFuCiAgICAgICAgdGl0bGU6IFByb3h5IFNlcnZlcnMKICAgICAgICByZXF1aXJl\
29-
ZDogdHJ1ZQogICAgICAtIG5hbWU6IHNlcnZlcgogICAgICAgIHR5cGU6IHN0cmluZwogICAgICAg\
30-
IHRpdGxlOiBQcm94eSBTZXJ2ZXJzIChJbnB1dCBhcyBhIENvbW1hIFNlcGFyYXRlZCBMaXN0KQog\
31-
ICAgICAtIG5hbWU6IGxiX21ldGhvZAogICAgICAgIHR5cGU6IGVudW0KICAgICAgICBlbnVtOiBb\
32-
J3JvdW5kX3JvYmluJywgJ2xlYXN0X2Nvbm4nLCAnaXBfaGFzaCddCiAgICAgICAgZGVmYXVsdDog\
33-
J3JvdW5kX3JvYmluJwogICAgICAgIHRpdGxlOiBMb2FkIEJhbGFuY2luZyBBbGdvcml0aG0KICAg\
34-
ICAgLSBuYW1lOiBzZXNzaW9uX3BlcnNpc3RlbmNlCiAgICAgICAgZGVmYXVsdDogZmFsc2UKICAg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5hbWUgb2YgU3RpY2t5IENvb2tpZQogICAgICAtIG5hbWU6\
38+
IHN0YXR1cwogICAgICAgIGRlZmF1bHQ6IGZhbHNlCiAgICAgICAgdHlwZTogYm9vbGVhbgogICAg\
39+
ICAgIHRpdGxlOiBFbmFibGUgU3RhdHVzIERhc2hib2FyZAo="
4040

4141
COPY playbooks /opt/apb/actions
4242
COPY roles /opt/ansible/roles

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You will also need to install the [APB application](https://github.com/fusor/ans
1212

1313
Finally, you will need to build an OpenShift NGINX Plus image. A Dockerfile to build the image can be found in the `dev` folder. You will need to copy your certs into the `certs` folder for the Docker image to work.
1414

15-
## How to Use
15+
## How to Install the NGINX Plus Service
1616

1717
1. Login to your `oc` cluster via the command that [catasb](https://github.com/fusor/catasb) will output at the end of the installation process.
1818
2. Clone this repository.
@@ -22,11 +22,34 @@ Finally, you will need to build an OpenShift NGINX Plus image. A Dockerfile to b
2222
6. Select the NGINX service, add it to `My Project`, select `Create` and click `View Project`.
2323
7. After waiting for a few seconds you should see a URL pop in the top-right corner of the console. That URL will take you to the default NGINX landing page. Alternatively you can select `Applications/Pods` via the left-side navbar and select the NGINX pod. From here you'll be able to use a terminal to manipulate NGINX.
2424

25+
## Sample Tutorial Walkthrough
26+
27+
### Option 1
28+
29+
1. Follow steps 1-5 listed in the **How to Install the NGINX Plus Service**.
30+
2. Deploy Python and PHP web servers by clicking each of the respective icons in the service catalog. For each service, select the `try sample repository` option, click `create` and finally `view project`. Wait for a few minutes until the deployment has completed.
31+
3. Once the deployment has finished, for each service select the drop-down arrow and click the link under the service header. You will be able to see the internal IP of the pod from here. Store the internal IP of both pods (note: while not explicitly specified all default pods are open at port 8080 instead of the normal default port 80 due to security reasons).
32+
4. Select the NGINX service. You will be able to edit a few NGINX configuration options. Select `Enable Proxy Servers` and input the internal IPs of the Python and PHP services as a comma separated list in the `Proxy Servers` textfield. You can also select `Enable Status Dashboard` if you want to see the NGINX Plus live status dashboard. Once you are done add the service to `My Project`, select `Create` and click `View Project`.
33+
4. Click the drop-down arrow for the NGINX Plus service. You will see two routes have been created. Cliking the route with `web` will take you to the NGINX Load Balancer. Clicking the route with `status` will take you to the NGINX live status dashboard.
34+
35+
### Option 2
36+
37+
1. Follow the steps listed in the **How to Install the NGINX Plus Service** section.
38+
2. Deploy Python and PHP web servers by clicking each of the respective icons in the service catalog. For each service, select the ‘try sample repository’ option, click `create` and finally `view project`. Wait for a few minutes until the deployment has completed.
39+
3. Once the deployment has finished, for each service select the drop-down arrow and click the link under the service header. You will be able to see the internal IP of the pod from here. Store the internal IP of both pods (note: while not explicitly specified all default pods are open at port 8080 instead of the normal default port 80 due to security reasons).
40+
4. Navigate to the terminal of your NGINX instance and edit your default.conf file. Add a proxy_pass directive and an upstream group with two server directives pointing to the internal IPs you previously wrote down (remember to add :8080). Save your changes and type `nginx -s reload`. Click the same URL as in step 7 of the `How to Install the NGINX Plus Service` section. Voila! You have a functional NGINX Load Balancer!
41+
2542
## Parameters
2643

2744
Name | Default Value | Required | Description
2845
---|---|---|---
2946
nginx_plus_image | openshift-nginx-plus | Yes | Name of NGINX Plus Docker image
47+
lb | false | No | Enable Proxy Servers
48+
server | | No | Proxy Servers (Input as a Comma Separated List)
49+
lb_method | round_robin | No | Load Balancing Algorithm
50+
session_persistence | false | No | Enable Session Persistence
51+
sticky_cookie | | No | Name of Sticky Cookie
52+
status | false | No | Enable Status Dashboard
3053

3154
## License
3255

apb.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,24 @@ plans:
2727
default: false
2828
type: boolean
2929
title: Proxy Servers
30-
required: true
3130
- name: server
31+
default:
3232
type: string
3333
title: Proxy Servers (Input as a Comma Separated List)
3434
- name: lb_method
35+
default: 'round_robin'
3536
type: enum
3637
enum: ['round_robin', 'least_conn', 'ip_hash']
37-
default: 'round_robin'
3838
title: Load Balancing Algorithm
3939
- name: session_persistence
4040
default: false
4141
type: boolean
42-
title: Session Persistence
42+
title: Enable Session Persistence
4343
- name: sticky_cookie
44+
default:
4445
type: string
4546
title: Name of Sticky Cookie
4647
- name: status
4748
default: false
4849
type: boolean
49-
title: Status Dashboard
50+
title: Enable Status Dashboard

0 commit comments

Comments
 (0)