As a product owner, I need to be able to review data and re-collect all the information used for the research.
AWS
-
Angular 9
-
Chart.js
-
Ng2-Charts
- Phython
Web Framework - Flask
Sci Kit Learn - https://scikit-learn.org/stable/ Numpy - https://www.numpy.org/ Pandas - https://pandas.pydata.org/ Statsmodels - https://www.statsmodels.org/stable/index.html xlrd - https://pypi.org/project/xlrd/ pydotplus - https://pypi.org/project/pydotplus/
Install Jupyter Notebooks by running the following:
pip install jupyter
To view the Jupyter notebooks within Chrome; navigate to the main directoy and enter in the following:
jupyter notebook
Request - https://2.python-requests.org//en/master/ Install by using:
pip install requests
- Pull a CSV from https://www.nasdaq.com/screening/company-list.aspx and insert into the package under the assets folder.
-
Terraform is being used to configure, deploy and provision infrastructure using an Infrastructure as Code approach.
-
What is happening under the covers?
-
A Virtual Private Cloud (VPC) is created and a subnet is created and associated with the new VPC.
-
An internet gateway is created to allow access from the web.
-
A security group is created to allow traffic on ports 80 (http) and 22 (ssh)
-
A key pair is also created using a public and private key that have been committed as part of the repository.
-
Lastly, an EC2 instance is created. Once the instance is available for use terraform provisioners handle updating packages, installing necessary packages and setting up the EC2 instance to be used as a docker host.
-
Docker is being used to describe and configure the flask web server required to host the Python RESTful API
-
As well as, the Postgres database required for storage of company, industry and sector data.
-
Lastly, Docker is being used to serve the Angular Single Page Application that is responsible for providing the data retrieved to the end-user in different manners.
-
Docker Compose is being used to launch all 3 applications in a cohesive manner while simplifying communications between the docker containers.
-
Download Terraform CLI from https://www.terraform.io/downloads.html. Place the executable in a safe location and add the executable to the System $PATH or to the Environment Variables.
-
Clone the repository from https://github.com/appddictionstudio/MDAS.git
-
Using either a command prompt or a bash shell, navigate to the repository cloned in step 2 and enter the infrastructure directory and then enter the terraform directory
-
Take the terraform.tfvars-template file and rename the file to terraform.tfvars
-
In the new terraform.tfvars file modify the user access key, secret key and region to match the credentials for AWS account being used for evaluation.
-
Execute the “terraform apply” command using the command prompt or bash shell previously opened in step 3. Once a plan is outline type “yes” and click “Enter”. This will begin the infrastructure deployment. Once the script completes an entire environment has been deployed to AWS supporting the entire application from database to RESTful API to Angular front-end.
-
In a browser navigate to your AWS console EC2 instance list and select the instance with the name “mdas docker host”. Select and copy the Public DNS (IPv4) value. It should look something like: ec2-13-58-54-21.us-east-2.compute.amazonaws.com.
-
Place the value just copied into a web browser address bar and click enter.
- Maintaining an entire environment for an application on a single EC2 instance is intended to allow simpler deployment and a true DevOps delivery pipeline. Rather than redeploying the application to a new environment the entire environment could be promoted without the need for even a virtual handoff.
To run locally for development, pull the github repo. Start the backend server Go to the backend directory and type ./bootstrap.sh to start the bash script which initiate the flask Web Framework
./bootstrap.sh
Start the frontend server Go to the frontend directory and type npm install to get all dependencies required to run the appliation. This pulls from the package.json file. Then run the command ng server.
npm install
ng serve
