Giter Club home page Giter Club logo

openshift-contrail's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.