Codeclimate CLI with custom engine manifest
1.5K
This is the main repository of the "Foresight" project.
This repository contains the following applications:
"Artanis", in which all contact information for organizations, individuals (and teams?) will be managed. It also provides authentication services for individuals & applications and grants them access to the rest of the system.
"Vulcan", in which all the information regarding applications in development will be tracked, categorized and managed.
"Sibyl", in which the real analysis work is done.
"Web UI", which will present the usable functionality to the users of the system.
"Cthulhu", which is our main integration service with Github, propagating github events through the Foresight Message Bus, and pushes data, perfors actions back at Github.
| Name | Role | Slack (icalialabs.slack.com) | |
|---|---|---|---|
| Abraham Kuri | [email protected] | CTO | @kurenn |
| Roberto Quintanilla | [email protected] | Engineer (Code owner) | @vovimayhem |
| Eduardo Higareda | [email protected] | Digital Designer | @eldelentes |
| Walter Reyes | [email protected] | Collaborator Engineer | @walreyes |
| Miguel García | [email protected] | Collaborator Engineer | @miguejs |
You must ask for access to this tools if you don't have them already:
Be sure to have Docker installed - Visit https://www.docker.com/community-edition for details.
Install plis - It's particularly important to use
it in this project, due to the high service count, and auxiliary/test/benchmark services in it.
Clone this repository into your local machine into the suggested path icalialabs/foresight:
$ git clone [email protected]:IcaliaLabs/foresight.git ~/icalialabs/foresight && cd ~/icalialabs/foresight
Since this project requires some access information (API keys, etc), and these are not checked-in
on Git, you should ask your Dev lead for a dotenv file. This file must be placed at the root of this
project, with the .env filename. An example on how this file should look is provided at
example.env.
Although the project is setup in such a way that databases are initialized automatically, sometimes it may be more convenient to restore the databases from database dump files. Since each app uses it's own database, the process is a bit more involved:
db/dumps folder.postgres service is up and running: plis start postgres. Wait a few seconds for
the server to start accepting connections.artanis database:
plis run postgres restoredb artanis_development [path-to-the-artanis-dump]vulcan database:
plis run postgres restoredb vulcan_development [path-to-the-vulcan-dump]sibyl database:
plis run postgres restoredb sibyl_development [path-to-the-sibyl-dump]cthulhu database:
plis run postgres restoredb cthulhu_development [path-to-the-cthulhu-dump]To bring up the whole application (backend and frontend), open up a terminal window and run:
$ plis start backend frontend
It will take a while when starting this the first time, as it will build the project containers.
Once started, you can follow the logs of all the project containers with:
$ plis logs -f
Once you see the web containers giving outputs like these:
artanis_web_1 | Puma starting in single mode...
artanis_web_1 | * Listening on tcp://0.0.0.0:32102
web_ui_1 | Build successful (15980ms) – Serving on http://localhost:4200/
This means the stack is up and running, and you should be able to see the website at http://localhost:4200
You might find out that working in the Web UI using Docker is slow - only on Mac and Windows. If this is the case, you can alternatively:
nvmnvmwatchman, and we need to have ember-cli, bower, and phantomjs npm packages installed
globally.web-ui/.env (ask your dev lead for it)web-ui/node_modules and web-ui/bower_components folders, if they are present.frontend_deps containers with plis start frontend_deps.web-ui directory.yarn to install dependencies.ember serve to fire up the web app.Most of the services are Rails applications. Since these are running inside containers, using tools
like byebug or pry to follow breakpoints in the code for debugging and interact with the app is
not straightforward when using Docker, but easy when using plis:
debugger whenever you need it in the code.plis logs -fplis attach [service_name] to attach your terminal window to
the paused process - plis will figure out which container to attach by using the service name.CTRL + P and then CTRL + Q to detach your terminal
window from the process. Using CTRL + C will effectively kill the container, and you'll need to
start the container again.To stop all of the running services in the stack at once:
$ plis stop
If you need to stop one in particular - or a list of services - you can:
% plis stop artanis_web artanis_jobs
artanis_web and artanis_jobs are the name of services located on the docker-compose.yml
file. You can get the names of all the available services/containers there, and stop any of them if
you need to.
Every application should have a test daemon that executes the test suite automatically whenever a change is made in the code. You can start all of the test containers:
plis start test && plis logs -f
Alternatively, you can fire up the test container to run the test suite manually:
plis run artanis_test rspec
And to run a specific test:
plis run artanis_test rspec spec/models/user_spec.rb
Icalia Foresight currently can't check reliably the code in a "mono-repository", so it's imperative that you do this manually - at least for the time being:
codeclimate analyzeRemember, any PR must not add new code issues to the project. See
CONTRIBUTING.md for more collaboration guidelines.
We replicate data (rather than tables) across all of the databases via AMQP, either on the same tables (as it's the case with OAuth tokens), or merged into tables (as it's the case with Organizations and Organization Units of Directory Services getting 'merged' as DirectoryEntries in Inventory Services). This allows each µService to replicate the information using the data structures that are a better fit for it's role in the system.
For data objects to be able to merge, it's imperative that they don't use a serial (i.e. autoincremental) primary key, but rather an UUID key. This keeps the ID collision probability to a minimum.
Content type
Image
Digest
Size
43.1 MB
Last updated
over 7 years ago
docker pull icalialabs/codeclimate