Skip to content

Commit

Permalink
updating setup scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
The ROSE project committed Mar 18, 2024
1 parent fee7d40 commit 629aa8b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
20 changes: 16 additions & 4 deletions scripts/setup_controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ CONTROLLER_ENV_FILE="$CONTROLLER_PATH/controller/config/controller.env"
# Activate the controller virtual environment
echo -e "\nActivating virtual environment"
source "$CONTROLLER_VENV_PATH"/bin/activate
source "$HOME/.envs/controller-venv/bin/activate"

# Install prerequisites
echo -e "\nInstalling graphviz and libgraphviz-dev"
Expand All @@ -32,22 +33,33 @@ find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs sudo rm -rf
# Install db_update library in develop mode
echo -e "\nInstalling rose-srv6-control-plane/db_update library"
cd "$DB_UPDATE_PATH" || { echo "Failure"; exit 1; }
python setup.py develop
#python setup.py develop
pip install -e .




# Install protobuf modules in develop mode
echo -e "\nInstalling rose-srv6-control-plane/control_plane/protos modules"
cd "$PROTOS_PATH" || { echo "Failure"; exit 1; }
python setup.py develop
#python setup.py develop
pip install -e .



# Install nb protobuf modules in develop mode
echo -e "\nInstalling rose-srv6-control-plane/control_plane/nb_protos modules"
cd "$NB_PROTOS_PATH" || { echo "Failure"; exit 1; }
python setup.py develop
#python setup.py develop
pip install -e .


# Install controller modules in develop mode
echo -e "\nInstalling rose-srv6-control-plane/control_plane/controller modules"
cd "$CONTROLLER_PATH" || { echo "Failure"; exit 1; }
python setup.py develop
#python setup.py develop
pip install -e .


# Deactivate the controller virtual envrironment
echo -e "\nDeactivating virtual environment"
Expand Down
20 changes: 17 additions & 3 deletions scripts/setup_node_mgr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ NODE_MGR_PATH="$CONTROL_PLANE_REPO/control_plane/node-manager"
NODE_MGR_STARTER_SH="$NODE_MGR_PATH/starter.sh"
NODE_MGR_ENV_FILE="$NODE_MGR_PATH/node_manager/config/node_manager.env"

# Install prerequisites
echo -e "\nInstalling libffi-dev"
sudo apt install -y libffi-dev

# Activate the node-manager virtual environment
echo -e "\nActivating virtual environment"
source "$NODE_MGR_VENV_PATH"/bin/activate
Expand All @@ -32,29 +36,39 @@ cd "$CONTROL_PLANE_REPO" || {
}
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs sudo rm -rf

#we need to install these beforehand, because some setup.py builds proto before
#installing the requirements :-(
pip install protobuf==3.19.6
pip install grpcio==1.41.1
pip install grpcio-tools==1.41.1


# Install prerequisites
echo -e "\nInstalling rose-srv6-data-plane modules"
cd "$DATA_PLANE_REPO" || {
echo "Failure"
exit 1
}
python setup.py develop
#python setup.py develop
pip install -e .

# Install protobuf modules in develop mode
echo -e "\nInstalling rose-srv6-control-plane/control_plane/protos modules"
cd "$PROTOS_PATH" || {
echo "Failure"
exit 1
}
python setup.py develop
#python setup.py develop
pip install -e .

# Install node-manager modules in develop mode
echo -e "\nInstalling rose-srv6-control-plane/control_plane/node-manager modules"
cd "$NODE_MGR_PATH" || {
echo "Failure"
exit 1
}
python setup.py develop
#python setup.py develop
pip install -e .

# Deactivate the node-manager virtual envrironment
echo -e "\nDeactivating virtual environment"
Expand Down

0 comments on commit 629aa8b

Please sign in to comment.