Giter Site home page Giter Site logo

vng-realisatie / nlx Goto Github PK

View Code? Open in Web Editor NEW
24.0 14.0 7.0 91.87 MB

*MIRROR* - NLX is an open source inter-organisational system facilitating federated authentication, secure connecting and protocolling in a large-scale, dynamic API landscape.

Home Page: https://gitlab.com/commonground/nlx/nlx

License: Other

Go 51.95% Shell 0.50% CSS 0.08% HTML 1.79% JavaScript 26.91% Dockerfile 0.58% PLpgSQL 0.18% Smarty 0.35% TypeScript 12.86% Mustache 1.56% Gherkin 0.55% Earthly 0.43% Open Policy Agent 0.02% Makefile 0.02% SCSS 2.21%
service-discovery logging authentication authorization api-gateway

nlx's Introduction

NLX System

NLX is an open source inter-organizational system facilitating federated authentication, secure connecting and protocolling in a large-scale, dynamic API landscape.

This repository contains all of the components required to act out the NLX Product Vision.

WARNING

This project been deprecated.

New users should use NLX based on the FSC Standard.

Developing on NLX

Please find the latest documentation for using NLX on docs.nlx.io. This is a good place to start if you would like to develop an application or service that uses or provides API access over NLX.

Questions and contributions

Read more on how to ask questions, file bugs and contribute code and documentation in CONTRIBUTING.md.

Troubleshooting

If you are running into other issues, please Post an Issue on GitLab.

Building and running an NLX network locally

The NLX project consists of multiple components that together make up the entire NLX platform. Some components run as centralized NLX services, others run on-premise at organizations. All components are maintained in a single repository. This means that a developer has all the tools and code to build and test the complete NLX platform in a single repository. It simplifies version and dependency management and allows changes that affect multiple components to be combined in a single feature branch and merge-request.

If you want to develop locally, or run your own NLX network, you will likely want to start all the components.

Cloning

Clone NLX in your workspace.

Note for Go developers: We advise to not clone NLX inside the GOPATH. If you must, be sure to set the environment variable GO111MODULE=on. Go doesn't need to be located in the GOPATH since it uses Go module support.

git clone https://gitlab.com/commonground/nlx/nlx
cd nlx

Development setup

Make sure you have installed the following tools:

Install the npm dependencies by running:

(cd management-ui && npm install)
(cd docs/website && npm install)

Make sure the TLS key files have the correct permissions to run the NLX components

./pki/fix-permissions.sh

Update the /etc/hosts file on your system:

Show hosts
# NLX
127.0.0.1     dex.shared.nlx.local
127.0.0.1     directory-api.shared.nlx.local

127.0.0.1     management-api.organization-a.nlx.local
127.0.0.1     management-proxy.organization-a.nlx.local
127.0.0.1     inway.organization-a.nlx.local
127.0.0.1     outway.organization-a.nlx.local
127.0.0.1     outway-2.organization-a.nlx.local
127.0.0.1     management.organization-a.nlx.local
127.0.0.1     txlog-api.organization-a.nlx.local

127.0.0.1     management-api.organization-b.nlx.local
127.0.0.1     management-proxy.organization-b.nlx.local
127.0.0.1     inway.organization-b.nlx.local
127.0.0.1     management.organization-b.nlx.local
127.0.0.1     auth.organization-b.nlx.local
127.0.0.1     txlog-api.organization-b.nlx.local

127.0.0.1     management-api.organization-c.nlx.local
127.0.0.1     inway.organization-c.nlx.local
127.0.0.1     outway.organization-c.nlx.local
127.0.0.1     management.organization-c.nlx.local
127.0.0.1     auth.organization-c.nlx.local
127.0.0.1     txlog-api.organization-c.nlx.local

::1           dex.shared.nlx.local
::1           directory-api.shared.nlx.local

::1           management-api.organization-a.nlx.local
::1           inway.organization-a.nlx.local
::1           management.organization-a.nlx.local
::1           txlog-api.organization-a.nlx.local

::1           management-api.organization-b.nlx.local
::1           inway.organization-b.nlx.local
::1           management.organization-b.nlx.local
::1           auth.organization-b.nlx.local

::1           management-api.organization-c.nlx.local
::1           inway.organization-c.nlx.local
::1           management.organization-c.nlx.local
::1           auth.organization-c.nlx.local

To start the services in development daemons with up-to-date databases, run: ./scripts/start-development.sh. Make sure Docker is running.

During the starting routines of the services, you might see a few services erroring that are dependent on a service that has not yet been started. This is expected behavior and will resolve itself within 5 seconds.

Services will reload automatically when the code changes and is saved.

Finally, run the Management UI using:

(cd management-ui && npm start)
(cd management-ui && npm run start:b)

This will start the management dashboard locally:

To log in locally, see credentials in dex.dev.yaml.

To test if the applications are running correctly, create a service called "Test" for "Organization A" and cURL the outway with curl localhost:7917/Organization-A/Test on the command line.

To start the directory UI or documentation website locally:

  • (cd directory-ui && npm start) to run the directory-ui (HTTP: 3001)
  • (cd docs/website && npm start) to run the docs (HTTP: 3002)

Deploying and releasing

The CI system of GitLab builds every push to the master branch and creates a release to Docker, tagging it with the short git commit hash. When a release is successful, it also gets deployed to the test environment.

When a git tag is pushed, GitLab builds and deploys it to the test and staging environments.

For branches prefixed with review/ (f.e. review/feature-name), a review environment will automatically be created for a shared testing environment.

Live environments

There are multiple environments for NLX

  • acceptance: follows the master branch automatically
  • demo, pre-production and production: updated after manually triggering a release

Overview of available links per environment:

Regenerating protobuf and mock files

Te execute the commands in the following sections, you will need to install Earthly. If you want to regenerate all files (protobuf and mocks), use the command:

earthly +all

Compiling gRPC proto files

Protobuf files can be regenerated using:

earthly +proto

You might want to regenerate the mocks after recompiling the protobuf files.

Mocks

Mocks can be regenerated using:

earthly +mocks

Further documentation

License

Copyright © VNG Realisatie 2017

Licensed under the EUPL

nlx's People

Contributors

8tomat8 avatar arnoudquanjer avatar bartjkdp avatar bvhme avatar commonground-bot avatar davidv1992 avatar dmijatovic avatar ehotting avatar fabianbuijing avatar geertjohan avatar gilgamez avatar henkvanmaanen avatar lucianonooijen avatar marcvanandel avatar mrtn78 avatar pimpolderman avatar publicjorn avatar renovate-bot avatar ronaldkoster86 avatar rubenwerdmuller avatar semantic-release-bot avatar spreeker avatar voles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.