It's possible to run Aurelia manually following the steps below. Besides compiling the code, you will need to have an instance of Andromeda running. Aurelia gets the data from Andromeda's data lake and transforms it to be displayed on the Application Page (web page).
You can also run Aurelia via docker container the instructions can be seen here.
You need:
OBS: If you already have another version of node and npm we recommend take a look at the n package or run Aurelia's docker container as presented here.
You need to install Git for Windows. All of the commands in this manual need to run over "Git Bash", not over "cmd.exe" or "powershell". You also need to run the following commands from an admin shell to be able to install the npm dependencies.
npm install --global --production windows-build-tools
npm install --global node-gyp
This will allow you to do npm install
.
See this and this for instructions on how to install Docker and Docker-compose.
For Windows, the installation instructions are here. Docker for Windows includes docker-compose.
Export the DOCKER_USER
variable to ensure the docker uses the same
user as the host. In Windows, $USER
isn't defined, so you'll need
to substitute it by your username:
export DOCKER_USER=$(id -u $USER)
You can see how to run Aurelia using the docker container on How to build and run the Aurelia container document.
You'll need to set up a few things before running Aurelia Webapp:
- Get Andromeda running
- Install Aurelia's backend and frontend dependencies;
- Create initial migration;
The first step to Run Aurelia is to clone the repository:
git clone https://github.com/Jellyfish-Insights/aurelia
cd aurelia
Now, we need to get andromeda as git submodule inside aurelia:
git submodule update --init --recursive
Aurelia uses Andromeda as a git submodule. This is because Aurelia needs some of the files included on the Andromeda repository to be compiled. To know more about how git submodule see this link
Aurelia is composed of the following subsystems:
- Backend: Transformers (ConsoleApp);
- Frontend: Web App.
Therefore, we will need to compile and run each of these subsystems separately.
On a terminal go to aurelia/src/WebApp
and execute:
npm install
Inside aurelia/src
do:
dotnet clean
dotnet build
We will need a database server to run Aurelia's webpage. We recommend to just use the docker container in the docker-compose-aurelia.yml file.
However, before creating the database needed by Aurelia, we need to have Andromeda's data lake running. You can see more information on how to run the data lake database here.
After you have the data lake container up, run the following command on the root of your cloned directory:
docker-compose -f docker-compose-aurelia.yml up -d analytics_platform
If the command ran successfully, you should see something like this on your terminal:
Creating volume "aurelia_analytics_platform_data" with default driver
Creating analytics_platform ... done
After that you need to add an entry to /etc/hosts
as the
following:
127.0.0.1 analytics_platform
Install PostgreSQL, and set the password of user postgres
to dbpassword
.
After that you need to add an entry to
C:\Windows\System32\Drivers\etc\hosts
as the following:
127.0.0.1 data_lake
127.0.0.1 analytics_platform
Finally, modify all appsettings.json
files
(aurelia/ConsoleApp/appsettings.json
and aurelia/WebApp/appsettings.json
)
removing the Port=5433
entry from the connection strings, and changing the
user to postgres
. You can more about the appsettings.json
files
here.
To apply the initial migrations, on terminal navigate to
aurelia/src/ConsoleApp
and run:
dotnet run migrate --application
Assuming that you just did the system bootstrap, it's time to run the system.
Before running the web app, we will need to get the data from Andromeda's
data lake and transforming it (format) to be displayed by the Webapp. To do
this, in the terminal navigate to aurelia/src/ConsoleApp
and run:
dotnet run transformer -s Application
To execute the WebApp
, got into its directory (aurelia/src/WebApp
) and
execute the following command:
dotnet run
When executing the WebApp
, the web system will be available
at http://localhost:5000
Make sure you set your email as the "DefaultUserEmail" in
aurelia/src/WebApp/appsettings.json
. Restart Web App and you'll become
an admin of the system.
To invite new users, navigate to the User Management page.