Create a CakePHP Application in OpenShift on Azure

3.5 hours
  • 4 Learning Objectives

About this Hands-on Lab

In this lab you will ssh into your master node and create a project named twinkie. You will then create a CakePHP application named twinkies using a pre-built template. After you create the application, you will then need to scale your CakePHP application to three pods.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Configure Cloud Shell

Set up Cloud Shell by clicking the Cloud Shell button in the top-right corner of the screen:

"Azure Cloud Shell"

Configure Cloud Shell for Bash using Advanced Settings. Use the existing subscription, resource group, and storage account. If your storage account does not populate, make sure that the West US region is selected. To make the file share, choose Create new and specify okdcloudshell as the new file share.

Download SSH Keys for the Lab

You will need to pull down the SSH keys to be able to connect to VMs. First, make the .ssh directory, if it isn’t already there, with the mkdir command.

Then, cd into the .ssh directory.

Next, use wget to pull down the SSH keys using these links:

Change the permission to the files to 600.

Create the App `twinkies`

Create a CakePHP app named "twinkies" and in the "Twinkie" project. You will need to create the project first the oc new-project command, and then use the oc new-app command to create your application with the "cakephp" template.

Scale Up the Application

Scale the "twinkies" application up to three pods using the oc scale command.

Additional Resources

Tallahassee busts into your office, yelling, "Times up! We need to deploy our app and fast. It needs to be thoroughly tested, and the developers are going to pull an all-nighter. It needs to be scaled to handle the testing load." You reassure him that the environment is ready, you just need to know what the big secret project is and what app needs to be deployed. He says, "Twinkie," the project is called "Twinkie," and the app will need to be a CakePHP app with a MySQL backend, and I want the app to be named twinkies. Now in your head, you ponder the irony of and app named twinkies, which is based off of CakePHP. You say, "Okay, sure, but why twinkies?" He says, "I just love those spongey yellow delicious cream-filled cakes." Now, create a CakePHP app named "twinkies" in a project called "twinkie," and scale the app to three pods to handle the testing load. What a day, let's get this done and go home!

Note: CORRECTION: Use US West for the Cloud Shell region field for this lab.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?