How to create a project with OpenShift Origin

With the OpenShift Origin web console, creating new projects and adding users to the project is quite simple.

How to create a project with OpenShift Origin With the OpenShift Origin web console, creating new projects and adding users to the project is quite simple.

If you've deployed OpenShift Origin (see How to Install OpenShift Origin on Ubuntu 18.04), you're ready to take the next step in developing, deploying, and managing your container applications. 

But once installed, what is the next step? You create a project. What is a project? An OpenShift Origin project is used to group and isolate related objects. By using this feature, you can then manage which developers have access to specific projects.

I'm going to walk you through the process of creating a project and then assigning a user to a specific role for that new project. I'll be doing this through the web-based OpenShift Origin GUI. 

SEE: Hybrid cloud: A guide for IT pros (TechRepublic download)

What you'll need

The only thing you'll need is a working instance of OpenShift Origin. 

How to access the GUI for OpenShift Origin

In order to access the GUI for OpenShift Origin, open a web browser and point it to https://SERVER_IP:8443 (Where SERVER_IP is the IP address of the OpenShift Origin server). If you wind up with a redirect loop to 127.0.0.1, you'll need to create an SSH tunnel from the client machine with the following command:

sudo ssh -L 8443:localhost:8443 -f -N USER@SERVER_IP

Where USER is a remote user on the OpenShift Origin server and SERVER_IP is the IP address of the OpenShift Origin server.

Once at the login screen use the credentials admin/admin and you'll find yourself on the main OpenShift Origin page (Figure A).

Figure A

ooprojecta.jpg

The OpenShift Origin main page.

How to create a project with OpenShift Origin

On this page, click the Create Project button. In the resulting popup (Figure B), give the project a name (you can only use lower case letters), a display name, and a description. After you fill out this information, click Create to create the project. 

Figure B

ooprojectb.jpg

Creating a new OpenShift Origin Project.

You will then be taken to the main page of that project (Figure C).

Figure C

ooprojectc.jpg

Our new project page.

At this point you can add content, by way of importing YAML or JSON definition file, and manage all aspects of your new project.

How to add users 

Before you start adding content to the project (or maybe you're not a developer, but the manager of the project), you'll want to add users. To do this, click the Resources tab in the left navigation and then click Membership (Figure D).

Figure D

ooprojectd.jpg

In the resulting window (Figure E), click Edit Membership.

Figure E

ooprojecte.jpg

Editing the membership of a project.

Type a name for the user to be added in the Name field (Figure F), and then select a role from the Roles drop-down. If you want the user to be able to immediately work with the project, select the Admin role for the user. When you've finished, click Add and then Done Editing. Your user has now been added.

Figure F

ooprojectf.jpg

Adding the new user.

To test to make sure the user has access to the project, open a terminal window on the OpenShift Origin server and issue the command:

oc login

Log in with the user credentials and you should see that the user now has access to the project (Figure G).

Figure G

ooprojectg.jpg

Our user has access to the new project.

The user can now import YAML/JSON files, build, deploy, and more--all from the OpenShift Origin web-based GUI.

And that's all it takes to create a new project and add a user to the project from within the OpenShift Origin web console.

Also see

openshiftopensourcepaasredhat.jpg