Skip to content

savithruml/openshift-contrail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RedHat OpenShift Container Platform

INTRODUCTION

This guide will demonstrate,

  • How to create a new project in OpenShift
  • Launch your first application
  • Learn how to trigger new builds/images when you make your first Github commit

RESOURCES

TRY IT OUT

  • Sign up for OpenShift online

  • Sign up for a GitHub account if you don't have one

  • Login to OpenShift online

    Click Open Web Console

    Web Console

  • Click New Project

    New Project

  • Provide a unique name, display name

    Click Create

    Project Info

  • Click on Add to Project

    Select Python under Browse Catalog

    Select Django + PostgreSQL (Persistent)

    Add to project

    Python Django

  • Login to Github

    Fork https://github.com/openshift/django-ex

    You must now have your own django-ex repository (https://github.com/<your-github-username>/django-ex)

  • Copy the URL https://github.com/<your-github-username>/django-ex & go back to OpenShift UI

  • In the window My-Project > Add to Project > Catalog > Django + PostgreSQL (Persistent) add your Github URL to the Git Repository URL field

    Click Create

    GitHub URL

  • In the next window, you will be given instructions to download the OpenShift client & also to create your first project. There is also a URL under Making code changes block

    Save this URL

    Continue

  • Go to https://github.com/<your-github-username>/django-ex/settings/hooks

    Paste the URL you saved from the previous step into the Payload URL field
    Change Content-type to application/json

    Click Add Webhook

    Webhook-1

    Webhook-2

  • A build should've been started by now. After the build has completed, you will find a URL in the Overview tab in OpenShift UI

    Clicking the URL should open your django web application

    Build-app

    app-live

  • Make some changes to the code, either in Github UI or on your local machine

    For example change the header in
    https://github.com/<your-github-username/django-ex/blob/master/welcome/templates/welcome/index.html line:214

    Commit the change

    BEFORE:
    
           line 214: <h1>Welcome to your Django application on OpenShift</h1>
    
    AFTER:
    
           line 214: <h1>This is my 1st Django application on OpenShift</h1>
    
  • This change should trigger a new build automatically

    Clicking on the URL should open the application, which is deployed with the changes you made

    Build-app-2

    app-live-2

About

RedHat OpenShift Demo with Contrail Networking

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages