technologies used: Nodejs, MySQL
'about' goes here https://docs.google.com/presentation/d/1yXcqzQ_bF7ZG4YzCxm1gXvq6DyfmKGHy297GhTXRL20/edit?usp=sharing
- DISTINCT
- Table of contents
- Getting Started
- Usage
- Tests
- Documentation
- Built With
- Versioning
- Authors
- License
- Acknowledgements
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. First you must have a machine that is working. Step by step instructions for creating/setting up your app on the AWS cloud platform (07/03/2018):
Server is hosted on port 3000. It can be changed in the config/config.js file.
instructions for different servers below
- Fork this repository
- Node.js installed (verify using
node --version
) - python 2.7 and java jdk is installed
- Install dependency packages using
npm install
at project root directory - MySQL server started
- In the config/config.js file, config.db username, password, and dbname must be set to match what you are using for your MySQL server
In command line in the repository's root directory, type npm start
. Please submit an issue if there are any problems.
Create an elasticbeanstalk application and setup the necessary configurations in order to run the server.
Your IAM user account must have privileges for ElasticBeanstalk, Amazon RDS, and ElasticFileSystem
======= steps in AWS =========
go to ElasticBeanStalk
create a new application
create a new environment
-choose Node.js for *Platform*
click create
wait for it to finish creating.
======== linking up to new amazon rds ========
go to configuration in your newly created environment
find *Database* card and click modify
enter your desired username and password and click save
wait for environment to finish updating configurations
======== connect EFS to your VPC =========
(the config file referred is storage-efs-createfilesystem.config)
go to https://console.aws.amazon.com/vpc
click *Your VPCs*
find your VPC ID and replace it in config file
click *Subnets*
find the Subnet IDs corresponding to the VPCID and add them all to config file
copy paste *Mount Target Resources* in the config file for each corresponding Subnet
========= uploading as zip =========
TBD
======= through eb cli ==========
TBD
- if your environment takes a long time to update but still fails, then there is probably something that is timing out
- you may link an existing database
- efs is only available in certain regions
- there is a limited number of security groups for each mount target
====== access your EB instance =======
TBD
======= access files in your EFS ========
(taken from https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstances.html)
go to AWS EC2
find the instance that your EFS is mounted on
click on the security group associated with that instance
go to the Inbound tab of the security group for that EB environment
click edit and add a new rule. type: ssh, port: 22, source: my ip
go back to EC2 Dashboard
click Key Pairs
create a new key pair (or import) and store your .pem file in a secure place
go to your Elastic Beanstalk application's configuration and click security
assign the key pair you just created to *EC2 key pair*
save and apply configurations
find the instance again in EC2 again
take note of its Public DNS
run the following command: ssh -i "<path>.pem" ec2-user@<Public DNS>
-if ec2-user doesn't work then try root
cd into the mount path that you specified for your EFS
======= access AWS mySQL ========
go to Amazon RDS
go to Instances on sidebar and click the database instance you want to connect to
go down to Security Group and click on the one that was type: Inbound
click Inbound tab
edit
change Source to "anywhere"
example: \c [email protected]:3306
sorry, no tests yet.
check out the docs in the docs folder or visit https://thebowja.github.io/DISTINCT-1/.
- express.js - The web framework used
- Node.js - Idk what
- MySQL
We use SemVer for versioning. For the versions available, see the tags on this repository. lol
- Eric Xin - Initial work - theBowja
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone who's code was used
- Inspiration
- etc