holi-meta
The meta repository which helps you check out the other repositories and run a development environment locally.
- Preface
- Getting started
- Running dev environments via mprocs
- TODO for Open Source contributions
- Helper scripts
- Port registry
- Terraform authentication (optional)
Preface
holi is quite complex, consisting of many components, running on a diverse tech stack. Because of this, setting up a development environment is hard to do without help. Even with help, it can go wrong.
We tried and are trying continuously to give our best support for setting up a dev environment. This manual is very detailed, while leaving some degrees of freedom to the developer. In order to succeed in setting up your dev environment, please try to follow this documentation as strict as you can. If you are running into issues during the setup that you can't figure out and where the documentation is lacking, feel free to contact the holi dev team for support.
Getting started
Requirements
brew
Installation
Some tools are installed via brew. Please follow the instructions for installing it (on MacOS AND also on Linux (using the default installation script, no "local installation") in order to keep cross-platform complexity low).
Configuration
Make sure to integrate the brew shell-hook before direnv, nodenv, nvm and pyenv to allow your environment to find tools
installed via brew and to avoid brew installed versions to take precedence over ones installed via other methods.
You can achieve this by installing the brew shell hook to .bashrc
(above all other hook we will install) instead
of the recommended .profile
file.
direnv
Installation
Please install direnv
(can be installed via brew install direnv
Configuration
Please set up the shell hook) for direnv.
nodenv/nvm
Installation
Before we get started with building, please ensure that nodenv is installed on your system:
-
nodenv
(brew install nodenv
& set up shell hook)
Follow the instructions in the corresponding READMEs for setup.
.node-version
(used by nodenv
) ensures that all developers are using the same node
/npm
versions.
It is kept in sync with .nvmrc
(used by nvm
) by a symbolic link, so please make sure to use a format that is
understood by both tools (e.g. a fixed version).
Allowing direnv
Once you installed these tools, please leave and re-enter the project directory. direnv will ask you for permission to execute:
direnv: error /home/exampleuser/holi-meta/.envrc is blocked. Run `direnv allow` to approve its content
Run direnv allow
to load the environment for the holi-meta
project. This will install your first node environment.
Afterwards, which npm
should point to a node environment managed by either nodenv
or nvm
.
Yarn
Installation
Install yarn using npm install --global yarn
.
Configuration
Add yarn commands to your path by commenting out the line export PATH="$PATH:$(yarn global bin)"
in your .envrc.local for being able to run mprocs
later. Afterwards, log out of your shell and log back in, switching back to the holi-meta project's directory. You should now be able to run 'yarn --version' successfully.
pyenv
Installation
Some components (e.g. holi-okuna and pubsub) require Python. They are using pyenv in order to install the specific versions of Python they need into virtualenvs. You can install it via brew.
Configuration
For building python versions from source, pyenv needs some build dependencies. Please install them according to this manual.
Ory
We're using Ory for authentication. For local development, we need a proxy. You can install the proxy via https://www.ory.sh/docs/guides/cli/installation using brew.
Google Pub/Sub Emulator
To develop and test our event-driven applications locally, we use the Google Pub/Sub emulator, which provides local emulation of the Google Cloud Pub/Sub production service.
Install gcloud
Please install gcloud
CLI, as well as a Java Runtime (via your preferred method). Later steps will then ensure correct installation of the emulator.
Information about Pub/Sub in development
Please note that all topics, subscriptions, and messages published to the emulator are only maintained for the lifetime of the emulator session.
Currently, okuna
stands as the sole publisher
of Google Pub/Sub and is responsible for pushing messages to the Pub/Sub topic. There are 2 currently subscribers
of this service, holi-ocis-integration
(ocis-subscriber
in mprocs-local-backend.yaml
) and holi-chat-integration
(chat-subscriber
in mprocs-local-backend.yaml
), both receive and consume those messages.
To obtain further information on the holi-ocis-integration
project, please refer to the accompanying README.md
.
OwnCloud Infinite Storage (OCIS)
OCIS is not run locally as a default. To run OCIS locally there are additional steps required, please read the readme
in holi-ocis
.