MyMenu
Follow installation and setup instructions https://webcms3.cse.unsw.edu.au/static/uploads/course/COMP9900/21T2/f27d53fa0797fbf9320dbe4b8ebc860988729b919247e127ed856cb3948066f4/VirtualBoxGuide.pdf
cd ~
git clone https://github.com/COMP3900-9900-Capstone-Project/capstoneproject-comp3900-w16a-jamar.git
Set up SSH to make dev easier with your own command line rather than command line on the VM GUI
- Before starting VM, open settings -> Network -> Adapter 1 -> Attached to and select Bridged Adapter
- Update and upgrade
sudo apt update
sudo apt upgrade
- Install openssh
sudo apt install openssh-server
- Verify that SSH server is running
sudo service sshd status
- Configure firewall and open port 22
sudo ufw enable
sudo ufw allow ssh
- Check that SSH is correctly configured
sudo ufw status
- Find IP address of VM
ip a | grep "inet 192"
# if more than 1 result is printed, either should work
- Connect to VM via host machine with password 'lubuntu'
ssh lubuntu@<ip address of vm>
- Add host SSH keys to ~/.ssh/authorized_keys to eliminate need to enter password
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git
sudo apt-get install npm
sudo npm install -g yarn
sudo apt install curl
Restart the shell
cd ~/capstoneproject-comp3900-w16a-jamar/frontend
npm install react-scripts
yarn add typescript
yarn add qrcode.react
- Download Go binary
cd ~
wget https://dl.google.com/go/go1.16.5.linux-amd64.tar.gz
- Verify Go tarball
sha256sum go1.16.5.linux-amd64.tar.gz
Output should look something like
Output
b12c23023b68de22f74c0524f10b753e7b08b1504cb7e417eccebdd3fae49061 go1.16.5.linux-amd64.tar.gz
- Extract Go tarball
sudo tar -C /usr/local -xzf go1.16.5.linux-amd64.tar.gz
- Add Go to $PATH
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.profile
- Load new path into current shell
source ~/.profile
- Verify Go installation
go version
Should have output
go version go1.16.5 linux/amd64
- Install Golang database library
go get -u github.com/lib/pq
- Install migrate
curl -s https://packagecloud.io/install/repositories/golang-migrate/migrate/script.deb.sh | sudo bash
sudo apt install migrate
- Install PostgreSQL
sudo apt install postgresql postgresql-contrib
- Check PostgreSQL is running
sudo service postgresql status
If not on, run
sudo service postgresql start
- Login to postgres and open psql shell
sudo su postgres
psql
Can inspect users with \du
in psql shell
4. Give user postgres a password
ALTER USER postgres WITH PASSWORD 'password';
- Exit back to user lubuntu
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04
- Update
sudo apt update
- Install prerequisite packages
sudo apt install apt-transport-https ca-certificates curl software-properties-common
- Add GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- Add Docker repo
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
- Update with new Docker packages and install Docker
sudo apt install docker-ce
- Verify that Docker is running
sudo service docker status
- Download docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- Apply permissions
sudo chmod +x /usr/local/bin/docker-compose
sudo chmod 666 /var/run/docker.sock
A number of csv files containing testing data are located in
~/capstoneproject-comp3900-w16a-jamar/backend/migrations
- To load these data, first run
cd ~/capstoneproject-comp3900-w16a-jamar/backend
sudo service postgresql stop
make db-stop
make db-start
make migrate-reset
make migrate-down
make migrate-up
make load-data # will load lots of dummy data
make core-run