Coder Social home page Coder Social logo

bitsbeats / openshift-library Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openshift/library

0.0 3.0 0.0 1.58 MB

Examples and Components for deploying into OpenShift

Home Page: https://www.openshift.com

License: Apache License 2.0

Makefile 3.88% Shell 11.88% Python 84.24%

openshift-library's Introduction

OpenShift Image Streams and Templates

Build Status Build Status

This repository contains a curated set of image streams and templates for OpenShift 3. See the official OpenShift documentation for more information about image streams and templates.

Overview

Official

Provided and supported by Red Hat, official Templates and ImageStreams are listed in the top level of this repository, making it easy for developers to get started creating applications with the newest technologies.

You can check to see which of the official Templates and ImageStreams are available in your OpenShift cluster by doing one of the following:

  • Log into the web console and click Add to Project

  • List them for the openshift project using the Command Line Interface

    $ oc get templates -n openshift
    $ oc get imagestreams -n openshift

Community

Community templates and image streams are not provided or supported by Red Hat. This curated list of community maintained resources exemplify OpenShift best practices and provide clear documentation to serve as a reference for other developers.

Building the Library

Python Dependencies

$ pip install -r requirements.txt

Running the Script

$ make import

Verifying Your Updates

$ make verify

The make verify command runs the following checks:

  • verifies YAML syntax
  • verifies the Python script (using pylint)
  • verifies that make import has been run

Contributing

Adding Your Template or ImageStream

  • Fork the openshift/library repository on github
  • Add your template or image stream to the community.yaml or official.yaml file in the top level of this project
  • Run the make import command and make sure that your template(s) and/or image-stream(s) are processed and written to the correct directory under the community or official folder and that no errors have occurred.
  • Run the make verify command and ensure that no errors occur
  • Commit and push your changes to your fork of the github repository
    • Make sure to commit any changes in the community and official folders
  • Create a pull request against the openshift/library upstream repository

That's it! Your pull request will be reviewed by a member of the OpenShift Team and merged if everything looks good.

YAML file structure:

variables: # (optional) top level block item
  <variable_name>: <value> # (optional)
data: # (required) top level block item
  <folder_name>: # (required) folder that the below items will be stored in
    imagestreams: # (optional) list of image-streams to process into the above folder
      - location: # (required) github url to a json file or folder of json files
        regex: # (optional) matched against ['metadata']['name'] in the json file
        suffix: # (optional) suffix for the file that is created ex: ruby-<suffix>.json
        docs: # (optional) web address of the documentation for this image-stream
    templates: # (optional) list of templates to process into the above folder
      - location: # (required) github url to a template or folder of templates in json format
        regex: # (optional) matched against ['metadata']['name'] in the json file
        suffix: # (optional) suffix for the file that is created ex: ruby-<suffix>.json
        docs: # (optional) web address of the documentation for this template

Variables

Anything under the data block can contain a reference to a variable by using the following syntax:

{variable_name}

You must also specify a value for that variable name under the variables block with the following syntax:

<variable_name>: <value>

Organization

Listings in the official.yaml file will be created in a sub folder of the official top level folder. Listings in the community.yaml file will be created in a sub folder of the community top level folder.

folder_name

The folder_name is a sub folder which represents a logical grouping for a set of templates or image-streams in the top level official or community folders.

location

The location must be a publicly available url that points to either a template, image-stream, or image-stream list file in JSON or YAML format

docs

The docs is a field to list the web address of the documentation for the template, image-stream, or image-stream list

regex

The regex is a plain string that is matched against the ['metadata']['name'] element in the template or image-stream. Make sure that the regex string that you provide is descriptive enough to only match the ['metadata']['name'] that you are trying to target.

suffix

The suffix is applied to the end of the filename that is created right before the .json file extension and can contain dashes (-) or underscores (_).

Additional information

Creating templates, image-streams, and image-stream lists

You can find more information about creating templates and image-streams in the official OpenShift Documentation. Below are some quick links to important sections:

openshift-library's People

Contributors

astefanutti avatar bekionel avatar bparees avatar coreydaley avatar danmcp avatar dinhxuanvu avatar dudash avatar gabemontero avatar galderz avatar howardgao avatar jamesnetherton avatar jeffdyoung avatar lance avatar liangxia avatar luciddreamz avatar luck3y avatar openshift-merge-robot avatar oprudkyi avatar rcernich avatar slaskawi avatar spolti avatar sspeiche avatar tmds avatar vbusch avatar vhalbert avatar

Watchers

 avatar  avatar  avatar

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.