GithubHelp home page GithubHelp logo

c172-charles-orderbook's Introduction

SRE Orderbook application

Orderbook is a Java Spring Boot application used for training purposes. It can be compiled using Maven;

Building

$ mvn -Dmaven.test.skip=true clean package

It can also be compiled using the Maven container, see the compose/Dockerfile.api, and the hub.docker.com image called maven:3.6.3-openjdk-11.

$ docker run -it --rm --name orderbook -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.3-jdk-8 mvn -Dmaven.test.skip=true clean package

Building with docker-compose

If you have Docker and docker-compose installed on your system then you can launch the application locally on your system using;

$ docker-compose -d up

This will launch the environment as it would in Kubernetes with the Database, API/Web UI, automated client.

Once launched the application will be available at;

http://localhost:8080

If for any reasons you are already running something on port 8080 then edit the docker-compose.yml file and change the following code;

ports:
  - "8080:8080"

Change the first 8080 to an available port on your system.

Using the application

The application has an API and a Web front end. The URLs of interest will show up if you go to;

localhost:8080

SRE Orderbook pipeline build

This is an example build job for the orderbook application pipeline. This branch contains the pipeline and docker configuration for the application and database.

GitHub no longer accept usernames and passwords so a token must be created and used as the password in Jenkins.

Steps to create the token;

  • Go to https://github.com/settings/tokens
  • Click the Generate new token button
  • In the Note box type in a use for the token, e.g., SRETraining
  • Specify when you want the token to end.  For this training select 7 days
  • Tick the box next to repo
  • Tick the box next to user
  • Click the Generate token button
  • Copy the access token value shown and store it somewhere for the next task

Steps to create a Jenkins pipeline job;

  • Go to https://jenkins.computerlab.online
  • Click on
  • In the Enter an item name box type in cXXXteamNN
  • Where cXXX is the course number from your instructor
  • Where NN is the team number assigned to you by your instructor
  • Click the Pipeline task
  • Click OK at the bottom of the screen

Steps to configuring the Jenkins job;

  • Scroll down the configuration page to Pipeline section
  • Or click the Pipeline tab
  • Click on the Definition pull down and change to Pipeline script from SCM
  • Click on the pull down for SCM and select Git
  • In the Repository URL text box paste in the sre-orderbook repository https://github.com/The-Software-Guild/sre-orderbook.git
  • Click on the Add button
  • Click Jenkins option with the house icon
    • A new window opens
    • Kind remains as a Username and password
    • Scope remains as Global (Jenkins, nodes, items, all child items, etc)
    • Username type in your GitHub username
    • Password copy in your GitHub access token
    • ID type in your name so that you are able to identify your token
    • Description type in the same as what you typed into ID
    • Click Add
  • Click on the pull down for Credentials and select your credential
  • Leave the branch as master for the time being, we may change it during the course
  • Leave the Script Path as Jenkinsfile
    • You only need change this if the file is in a different place, or name
  • Click the Save button
  • Click Build to start the build

NOTE: This job has a 10 minute polling set up to check GitHub

c172-charles-orderbook's People

Contributors

stevshil avatar cmbenson avatar m3steve avatar cmartintlh avatar pmenefee avatar

Watchers

 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.