Skip to content

Project 1

bobbypr edited this page May 3, 2020 · 1 revision

Welcome to the ScrumLords wiki!

To get started with the weather forecast app, you'll need to run the services in the following order:

  1. All the backend servers.
  2. Create pubsub topics and subscriptions using Google pubsub emulator.
  3. Run the frontend service.

Setting Up Prerequisites

First step is to clone this repository.

Make sure your system has the following installed:

  • Python 3.7
  • Java 1.8
  • Nodejs

Note: Also, check that

1. Your $JAVA_HOME environment variable is set to your Java 1.8 installation.

2. Nothing is running on the following ports: 8000, 8100, 8200, 8300, 8400, 3000, 5000 and 8085.

You can check if a port is in use using the following command:

sudo netstat -anp | grep '<port>'

You will also need the Google Cloud SDK as well as the Google Pubsub emulator installed on your machine. Use the following docs to set these up:

  1. For Google Cloud SDK
  2. For Google Pubsub Emulator.

You also need to install either conda or virtualenv so that you can create and run a everything inside a virtual environment. Use the following docs to install either of these: [Note: conda is strongly recommended]

Note: Make sure the environment that you create is named manager and is using python 3.7.


Firing Up The Microservices

First, make sure you are in the ScrumLords directory. Now, we will start each service sequentially.

1. API Manager

  1. Open a new tab in terminal in ScrumLords directory.

  2. cd into manager

  3. conda activate manager

  4. pip install -r requirements-dev.txt. This will make sure all required python packages are installed. Run this command only once.

  5. Now, to start the server, depending on your OS and shell type, run any one of the following commands:

    zsh runserver.sh

    bash runserver.sh

    ./runserver.sh

    sudo ./runserver.sh

2. Session Manager

  1. Open a new tab in terminal in ScrumLords directory.

  2. cd into session_manager

  3. conda activate manager

  4. Now, to start the server, depending on your OS and shell type, run any one of the following commands:

    zsh runserver.sh

    bash runserver.sh

    ./runserver.sh

    sudo ./runserver.sh

3. Data Retrieval

  1. Open a new tab in terminal in ScrumLords directory.

  2. cd into weather_data_retrieval

  3. conda activate manager

  4. Now, to start the server, depending on your OS and shell type, run any one of the following commands:

    zsh runserver.sh

    bash runserver.sh

    ./runserver.sh

    sudo ./runserver.sh

4. Model Execution

  1. Open a new tab in terminal in ScrumLords directory.

  2. cd into model_execution

  3. conda activate manager

  4. Now, to start the server, depending on your OS and shell type, run any one of the following commands:

    zsh runserver.sh

    bash runserver.sh

    ./runserver.sh

    sudo ./runserver.sh

5. Post Processing And Analysis

  1. Open a new tab in terminal in ScrumLords directory.

  2. cd into postprocessor

  3. Now, to start the server, run: ./mvnw spring-boot:run

6. Google Pubsub Emulator

Assuming you have set up the Google Cloud SDK and Google Pubsub Emulator, follow these steps:

  1. Open a new tab in terminal in ScrumLords directory.

  2. cd into manager

  3. conda activate manager

  4. gcloud beta emulators pubsub start. This will start running the emulator on port 8085.

7. Setting up Pubsub Topics and Subscriptions

  1. Open a new tab in terminal in ScrumLords directory.

  2. cd into manager

  3. conda activate manager

  4. Now run any one of the following commands, again depending on your OS and shell type:

    zsh pubsub_setup.sh

    bash pubsub_setup.sh

    ./pubsub_setup.sh

    sudo ./pubsub_setup.sh

8. User Management and User Interface

  1. Open a new tab in terminal in ScrumLords directory.

  2. cd into user_interface/client

  3. npm install. This will install all client dependencies.

  4. Go back to ScrumLords directory.

  5. cd into user_server

  6. npm install. This will install all server dependencies.

  7. npm run dev. This will run both Express and React.

The web application will launch in localhost:3000/.