Skip to content

MatousJobanek/registration-service

 
 

Repository files navigation

Registration Service

Go Report Card GoDoc Codecov.io

This is the CodeReady Toolchain Registration Service repository. It implements the registration flow for the Toolchain SaaS.

Build

Requires Go version 1.13 - download for your development environment here.

This repository uses Go modules. You may need to export GO111MODULE=on to turn modules support "on".

To build, execute:

make build

This builds the executable with bundled assets. Only the binary needs to be deployed, all static assets are bundled with the binary.

To just generate the asset bundle, execute:

make generate

This creates the asset bundle in the static package. Do not change the asset bundle file(s), changes will be lost on the next build.

Development

To make development on the static content easier, a development binary can be built using:

make build-dev

The resulting binare does not use bundled assets but reads static content directly from pkg/assets. Do not deploy the dev binary.

Tests

Tests are run by executing:

make test

Tests are run with bundled assets, see above.

VSCode Testing/Debugging

To use the internal test runner and debug features of VSCode, you need to make sure that VSCode runs in a context where Go Modules are enabled. To do this, run:

export GO111MODULE=on

Before running VSCode from that shell.

Deploying on minishift without operators

To deploy Registration Service only (no operator deployed) on local minishift, start your minishift then run:

eval $(minishift docker-env)
make deploy-dev

The service can be accessed via the corresponding route:

$ oc get routes registration-service

NAME                   HOST/PORT                                                            PATH      SERVICES               PORT      TERMINATION   WILDCARD
registration-service   registration-service-toolchain-host-operator.192.168.42.237.nip.io             registration-service   8080                    None

You can now open the URL from HOST/PORT in your browser:

Note: the actual route/URL will be different in your minishift.

Deploying all operators and Registration Service

All e2e resources such as Host operator, Member operator, Registration Service, CRDs, etc can be deployed via:

make deploy-e2e

Host and member operators will be downloaded from the master branch and the local registration-service repo will be used to deploy the Registration Service.

By default this target deploys resources to toolchain-host-operator and toolchain-member-operator namespaces.

Note
If running in Minishift eval $(minishift docker-env) and eval $(minishift oc-env) are required. If running in CodeReady Containers eval $(crc oc-env) is required.

About

Service for new user registration flows.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 87.5%
  • Makefile 5.5%
  • JavaScript 3.7%
  • HTML 2.1%
  • CSS 0.8%
  • Shell 0.2%
  • Dockerfile 0.2%