http://panda.eba-gaci4fx8.us-west-2.elasticbeanstalk.com/
(for linux please do docker-compose, for mac please do docker compose without "-")
- build
$ docker-compose build
- drop and recreate and migrate db
$ docker-compose run web rake db:drop db:create db:migrate
if you wish to use seed file, run
$ docker-compose run web rake db:drop db:create db:migrate db:seed
- start the server
$ docker-compose up
- put http://0.0.0.0:3000/ in browser, press RETERN
- create your branch locally
$ git branch [username]/[branchname]
- see if your branch created locally
$ git branch
- go to your branch
$ git checkout [username]/[branchname]
- make edits to web content
- git add your change
$ git add .
- make your message
$ git commit -m "[your message]"
- git push
$ git push origin [your branch]
- open new pull request On GitHub page Pull Requests -> new pull request -> change field to "base:main branch <- compare:[yourbranch]"
- put some message in message box
- ask for at least 1 reviewer to approve (your teammate)
- resolve any conflict in local by typing this in your console
git pull origin main --rebase
Then in the source control on the leftside bar of VSCode, follow the prompt to accept incoming/current change add all change make a commit
$ git push origin [yourbranch] --force-with-lease
- click merge button in browser to main branch
- ssh to remote with PANDA.pem in current directory
ssh -i PANDA.pem [email protected]
- create a tsung instance (remember to terminate after use)
- In [email protected] remote, run this, it will open a Tsung instance
/bin/launch_tsung.sh
- This command will output a ssh command (1) and a link(2) (NOTE:Remember it or write it down somewhere)
- type ssh command(1) of step 2 in the [email protected] remote, it will open another ssh remote, which is the Tsung remote
- Now we are in Tsung remote, there should be a example xml tsung test file called tsung_example.xml
- Put the test file you wrote in root of Tsung remote, run *Replace demo.xml with your tsung test.xml
tsung -f demo.xml -k start
- In your favorite browser(Chrome) type in link(2) you got from step 2
- You will see the log and graph and report for tsung
It's better to open three terminal 1 for local; 1 for [email protected]; 1 for Tsung instance [email protected]
- Open another ssh remote without terminate previous one
ssh -i PANDA.pem [email protected]
- Save log: In the new [email protected] instance run replace [email protected] with the text after ssh of ssh command (1) you get from step 2 of tsung test
rsync -auvL [email protected]:tsung_logs .
- Save graphs:
- In Tsung instance, cd into tsung_logs folder, ls to see the log timestamp name
- Then replace [20171108-2133] and [20171108-2146] with the time stamp name
tsplot -d graphs m3_medium ./[20171108-2133]/tsung.log m3_large ./[20171108-2146]/tsung.log
- Save log and graph to your local computer
- In Tsung instance [email protected], print directory of graph folder
pwd
- In [email protected] remote, copy the graph folder from Tsung instance [email protected] to [email protected] remote Replace [/home/user/graphs] with result of previous step
scp -r [email protected]:[/home/user/graphs] .
run pwd again to see where the graph file is
pwd
- In console of your local computer, cd into a directory with authorizer of PANDA.pem file then copy the graphs to this directory replace [~/graphs] with the location of graph file of previous step
scp -r -i PANDA.pem [email protected]:[~/graphs] .
docker-compose run web rake db:drop db:create db:migrate
run:
cd seed
pip3 install requests
python3 seed.py