Docsity

Setting up a PHP Application on OpenShift PaaS using Ubuntu Server 20.04, Summaries of Mathematics

Toggle sidebar
bg1
LAB 3 - PAAS
Start with Ubuntu Server 20.04
Switch to root environments
sudo -i
Update the repositories first
apt update
You also should upgrade the Ubuntu system to get the up-to-date (optional).
apt upgrade
Use these commands to install docker and start docker
apt-get install docker.io -y
Enable and start the docker daemon (service)
systemctl start docker
systemctl enable docker
Downloads openshift
wget https://github.com/openshift/origin/releases/download/v3.11.0/openshift-
origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Setting up a PHP Application on OpenShift PaaS using Ubuntu Server 20.04 and more Summaries Mathematics in PDF only on Docsity!

LAB 3 - PAAS

Start with Ubuntu Server 20. Switch to root environments sudo -i Update the repositories first apt update You also should upgrade the Ubuntu system to get the up-to-date (optional). apt upgrade Use these commands to install docker and start docker apt-get install docker.io -y Enable and start the docker daemon (service) systemctl start docker systemctl enable docker Downloads openshift wget https://github.com/openshift/origin/releases/download/v3.11.0/openshift- origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz

Extract the .tar.gz file tar -xvzf openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz Next, change the directory to the extracted directory and copy kubectl and oc binaries to the /usr/local/bin directory. cd openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit Copy executable files to /usr/local/bin/ so that we can call it in any location. cp oc kubectl /usr/local/bin/

Next, you will need to create a new daemon.json file and allow subnet (inside

Openshift network) 172.30.0.0/16 can communicate without secure protocol

(HTTPS).

vi /etc/docker/daemon.json Add the following line:

"insecure-registries" : [ "172.30.0.0/16" ]

Restart the docker daemon

systemctl restart docker

Now, start the OpenShift Origin cluster by specifying your system's IP:

oc cluster up --base-dir="$HOME/.occluster" --public-hostname= After finishing you get this messages:

Open Browser enter https:// :8443/console to access Openshift

Test with a project

We will use https://github.com as this project repository

In Github page, create new project

Click New button

Then click Create Repository

On Openshift, click Create project button

After create the lab3-paas, you can see:

Select lab3-paas

Click Browse Catalog to select the kind of application

In this test, we will try the test app with PHP as below

Click Create button

Click to that project to see status

You might get the failed log as below

We should change some building configuration on this app

Go to Build, select Builds then select app test-paas

  • Select the Build #

Click Action > Edit Configuration

At the bottom of Edit configuration page, click Show advanced options

Change the Git Reference from master to main, then Save it

Click Start Build button

After a few seconds, build #2 is complete

Now, we can test the test-paas

Remember the URL is http://app-name-project-name.your-server-ip.nip.io

We have just finished build an app (web app) on PaaS!

FIX ERROR: Time out while connecting outside