Professional Documents
Culture Documents
Openshift Presentation
Openshift Presentation
A.L.I.C.E.
Cornelius Yap, Tiffany Goh, Samuel Lye
Agenda
1. Background
3. Openshift
- Openshift Terminal
- Creating New Applications (Build and Deployment)
4. Routing
5. Auto Scaling
6. Load Balancing
2
Background
3
Background
4
Docker
5
Dockerfile
● To start building a Docker image, run
the following commands:
- cd into the root directory of the
folder, e.g. cd NER
- run docker build .
- run docker run
[docker_image] -p
5080:5080
6
Docker Compose
● Docker Compose is a tool for defining and running multi-container Docker
applications.
- Define a docker-compose.yml file and run docker-compose up. If
images are not built, they will be built during the docker-compose up
process.
7
Kubernetes
1. First, copy your login command from the Openshift Web Console
2. In your local terminal, paste and run the Openshift Login Command
9
Creating New
Applications
3. If your github repo is private, your have to first create a secret key using your
github username and password:
- In the Openshift web console: Resources > Secrets > Create Secret
10
Creating New
Applications
4. In your local terminal, run the oc new-app command
- oc new-app https://github.com/luketankw/ALICE.git --
source-secret=leekw --strategy=docker --context-
dir=backend/AliceBackEnd/TopicModelling --name=topics
- The first argument is the source of the github repo; --source-secret is the name
of the secret used to access the private github repo; --strategy specifies the
build strategy (either docker or source); --context-dir specifies the file directory
of the build path.
11
Creating New
Applications
5. There was in issue we faced using the web console to create our application.
- Openshift has multiple ways to create applications. We tried using the Source
to Image (S2I) method which generates a new Docker image using source
code and a builder Docker image, i.e. --strategy=source
- However, using S2I ignores the Dockerfile in the github repo and is why we
chose to use the Openshift terminal commands instead of the web console to
create our application, i.e. --strategy=docker
12
Routing
13
Routing
14
Routing
15
Routing
16
Routing
17
Routing
18
Architecture
Threading Each child thread runs
Load Balancing 1. Topic Modelling
1
Auto Scaling 2. Sentiment Fi le
:
3. Classifier ad1 Topic Modelling
…. t hre 2
ild le
Ch F i
(Each file runs on a separate
2:
d thread in a pod)
rea
Send 2 files th .
Upload Page i ld
Ch .
Relation Pod 1
Main Thread
20
Auto Scaling
21
Auto Scaling
22
Auto Scaling
23
Load Balancing
24
Load Balancing
25
Load Balancing
26
Internship 2020
A.L.I.C.E.
Thank you!