Git Product home page Git Product logo

buildly's Introduction

Buildly - Platform Core Service

https://buildly.io

The partner front end service for Buildly is [Buildly UI (Angular) and Buildly-UI Core]:https://github.com/buildlyio/buildly-ui and is configured to connect to the Buildly core automatically and facilitate connections to addiional platform frontend and backend services.

Deploy locally via Docker

Build first the images:

docker-compose build # --no-cache to force deps installation

To run the webserver (go to 127.0.0.1:8080):

docker-compose up # -d for detached

User: admin Password: admin.

To run the webserver with pdb support:

docker-compose run --rm --service-ports Buildly

To run bash:

docker-compose run --entrypoint '/usr/bin/env' --rm Buildly bash

or if you initialized already a container:

docker exec -it Buildly bash

To connect to the database when the container is running:

docker exec -it postgres_Buildly psql -U root Buildly

If the database is empty, you may want to populate extra demo data to play around:

docker-compose run --entrypoint 'python manage.py loadinitialdata --demo' Buildly

Or if you want to restore the demo data keeping the users:

docker-compose run --entrypoint 'python manage.py loadinitialdata --restore' Buildly

If you would like to clean the database and start the application, do:

docker-compose up --renew-anon-volumes --force-recreate --build

Tests

To run the tests (without flake8) and have ipdb open on error:

docker-compose run --entrypoint '/usr/bin/env' --rm Buildly bash scripts/run-tests.sh --keepdb --bash_on_finish

To run the tests like if it was CI with flake8:

docker-compose run --entrypoint '/usr/bin/env' --rm Buildly bash scripts/run-tests.sh --ci

See pytest --help for more options.

Set up

First steps

  1. Create a superuser: python manage.py createsuperuser
  2. Add basic data: python manage.py loadinitialdata

Configure the API authentication

All clients interact with our API using the OAuth2 protocol. In order to configure it, go to admin/oauth2_provider/application/ and add a new application there.

Configure Elasticsearch (search function)

Search Function is configured through connected search service. https://github.com/humanitec/search_service

Configure other services

There are many other services and behaviours determined by the application's configuration. Revise Buildly/settings/base.py and configure your environment variables so all services work without failures.

Generating RSA keys

For using JWT as authentication method, we need to configure public and private RSA keys.

The following commands will generate a public and private key. The private key will stay in Buildly and the public one will be supplied to microservices in order to verify the authenticity of the message:

$ openssl genrsa -out private.pem 2048
$ openssl rsa -in private.pem -outform PEM -pubout -out public.pem

Troubleshooting

Local environment problems

If you're getting an error in your local environment, it can be related to the social-core library. To solve this issue you need to execute the following step:

  • With the container running, go into it with this command:

    docker-compose run --entrypoint '/usr/bin/env' --rm Buildly bash

  • Install the social-core lib again:

    pip install -e git://github.com/toladata/social-core#egg=social-core

  • Restart the container to apply the changes.

Creating PRs and Issues

The following templates were created to easy the way to create tickets and help the developer.

  • Bugs and Issues [+]
  • New features [+]
  • Pull requests [+]

Use the following template to create tickets for E-Mail:

From: [email_address]
To: [email_address]
Cc: [email_address]
Bcc: [email_address]
Reply-to: [email_address]

Subject: 'Title'
Body: 'Text message'(HTML)

buildly's People

Watchers

James Cloos 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.