-
Notifications
You must be signed in to change notification settings - Fork 3
Installation (Native Setup)
- Clone the repository:
git clone https://github.com/hyrise/Cockpit.git
- Enter the Cockpit directory:
cd Cockpit
If you want to install the Cockpit at a different machine you need to add a .env
in the frontend folder first. For example, lets say you want to run the Cockpit on the machine with the IP 123.123.123.123
then run:
- Enter the front end directory:
cd hyrisecockpit/frontend
- create a .env:
touch .env
- Edit the .env the following way:
VUE_APP_BACKEND_HOST="123.123.123.123"
VUE_APP_BACKEND_LISTENING="0.0.0.0"
VUE_APP_BACKEND_PORT="8000"
You can install and set up the cockpit in a virtual environment by executing the install script. It will install all packages and an influx (if none is installed). Just run:
./install_dependencies.sh
First, you need to install the influx database:
https://docs.influxdata.com/influxdb/v1.8/introduction/install/
Create a venv folder within the Cockpit folder:
python3 -m venv venv
Before you can install the project, activate the corresponding environment:
. venv/bin/activate
To be able to start the frontend via python you need to set the path to the frontend. For that run:
sed -i "s:hyrisecockpit/frontend:$PWD/hyrisecockpit/frontend:g" hyrisecockpit/run.py
To install all packages run:
pip3 install wheel && pip3 install -r requirements.txt
To install the Cockpit run:
pip3 install .
After that deactivate the environment since all python packages are installed:
deactivate
Last but not least reset the path to the frontend:
sed -i "s:$PWD/hyrisecockpit/frontend:hyrisecockpit/frontend:g" hyrisecockpit/run.py
To install the frontend run:
cd hyrisecockpit/frontend \
&& npm install --no-optional
&& npm audit fix
&& npm run build:min
First, you need to enter the environment. For that run:
. venv/bin/activate
Now you can start the cockpit with:
cockpit
If you just want to start the backend you can run:
cockpit --backend
If you want to close the cockpit just send an Interrupt ^C
and exit the environment with deactivate
.
If you want to uninstall the cockpit run the following command to delete the python module:
rm -r venv
To uninstall all frontend related npm packages have a look at:
https://docs.npmjs.com/uninstalling-packages-and-dependencies
You can add a Hyrise that is running in docker. On how to set up the Hyrise have a look at https://github.com/hyrise/Cockpit/wiki/Docker-Setup#add-a-hyrise-instance-in-the-frontend . If you use the Hyrise instance in the docker containers on the same machine, you can add them in the fronted UI (click on "database", click on "add database", enter the host and port) with:
(hyrise_1)
host: 0.0.0.0
: 5432
(hyrise_2)
host: 0.0.0.0
: 6432
If the docker Hyrise instances are running on a different machine lets say it has the IP 444.444.444.444
you can add them with:
(hyrise_1)
host: 444.444.444.444
: 5432
(hyrise_2)
host: 444.444.444.444
: 6432
It is important to use a Hyrise that is set up correctly. For that please have a look at https://github.com/hyrise/Cockpit/wiki/Hyrise-Things .
If the Hyrise is running on the same machine you can add them in the fronted UI (click on "database", click on "add database", enter the host and port) with:
host: 0.0.0.0
port: Is the port that you set by starting the Hyrise (default is 5432)
If the Hyrise is running on a different machine lets say it has the IP 444.444.444.444
you can add a Hyrise with:
host: 444.444.444.444
port: Is the port that you set by starting the Hyrise (default is 5432)