GithubHelp home page GithubHelp logo

ministryofjustice / operations-engineering-join-github Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 654 KB

An application to augment the process of joining a Ministry of Justice GitHub Organisation • This repository is defined and managed in Terraform

Home Page: https://dev.join-github.service.justice.gov.uk/

License: MIT License

Dockerfile 0.94% Python 45.60% HTML 49.46% Makefile 2.04% Smarty 1.98%
operations-engineering

operations-engineering-join-github's Introduction

Join a Ministry of Justice GitHub Organisation

repo standards badge

  1. Prerequisites
  2. Development
  3. Deployment

Overview

Welcome to the GitHub repository for our "Join GitHub" onboarding application. This application streamlines the process of adding new users to our two primary GitHub organisations: ministryofjustice and moj-analytical-services.

The aim of this application is to provide a user-friendly interface for onboarding new team members into our GitHub organisations. It simplifies the administrative process, ensuring a smooth and efficient integration for new users.

Prerequisites

To develop, deploy or run this app, you will need to install the following:

Development

Environment setup

Refer to the .env.example file for the required variables. Create a .env file from this in the project root. Note that .env is included in .gitignore so it is not tracked.

cp .env.example .env

To enable the auth0 authentication to run locally requires the actual AUTH0_CLIENT_ID and AUTH0_CLIENT_SECRET (by default set to dev). To access these login to auth0 and go to the operations-engineering tenant then,

Applications -> Applications -> ops-eng-test-azure-ad

Copy the Client ID and the Client Secret into your .env. Then source the .env and proceed.

source .env

Run application from Terminal

To run the application locally from the terminal use:

make local

Then open a browser to http://127.0.0.1:4567.

To use Docker run the following command and open a browser to http://0.0.0.0:4567:

make docker-up

Linting

To run the linter, run the following command:

make lint

Our project employs MegaLinter in our GitHub Actions to automatically ensure code quality on every pull request. It performs extensive linting across various languages and file formats, including Python, Bash, Markdown, Dockerfiles, JSON, Kubernetes configurations, and YAML. Configured in the .github/workflows/ directory, MegaLinter helps identify issues early, enforcing best practices and style guidelines.

Testing

To run the tests, run the following command:

make test

Deployment

Tokens and Secrets

All necessary tokens and secrets required for the deployment processes are manually set in the GitHub repository secrets. These include access tokens for various services and sensitive configuration data.

Deployment Pipelines

This project utilises two separate deployment pipelines:

Development Deployment Pipeline

To deploy to the operations-engineering-join-github-dev namespace, use the following steps:

  1. Ensure your changes are committed to the main branch through the relevant pull request process.
  2. The pipeline will automatically deploy the latest commit SHA to the development namespace using the Helm chart located in helm/join-github.

Production Deployment Pipeline

To deploy the latest tag push to GitHub in the production environment, follow these steps:

  1. Clone the repository and ensure you have the latest updates from the main branch.

  2. Create a new tag using the Git tagging system. For example, to create tag v0.0.1, run:

    git tag v0.0.1

When creating a new tag, use semantic versioning (e.g., v1.0.0, v1.0.1). This practice helps in maintaining version control and understanding the nature of the changes (major, minor, or patch).

  1. Push the tag to the repository:

    git push --tags
  2. The pipeline will automatically deploy the application to the operations-engineering-join-github-prod namespace.

Development environment

The Cloud Platform namespace for this project is called operations-engineering-join-github-dev.

You can see the development app running at: https://dev.join-github.service.justice.gov.uk/

And access Cloud Platform's namespace using:

kubectl get pods -n operations-engineering-join-github-dev

Production environment

The Cloud Platform namespace for the production environment is operations-engineering-join-github-prod.

You can see the production app running at: https://join-github.service.justice.gov.uk/

To interact with the production environment, use kubectl commands. For example:

kubectl get pods -n operations-engineering-join-github-prod

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you want to change.

Please make sure to update tests as appropriate.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact Us

If you have any questions or need further clarification, feel free to ask in the #ask-operations-engineering channel on Slack or email us at [email protected].

operations-engineering-join-github's People

Contributors

jasonbirchall avatar peppermoj avatar tamsinforbes avatar levgorbunov1 avatar connormaglynn avatar vijaykannan21 avatar ben-al avatar github-actions[bot] avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

Gareth.m.Davies avatar Paul Wyborn 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.