Skip to content

0.9.0

Latest
Compare
Choose a tag to compare
@oguzkagnici oguzkagnici released this 16 Dec 18:55
· 4 commits to main since this release
de0e189

Group 8 CMPE 451 2024 Fall Final Release

What's Changed

Full Changelog: customer-milestone-2...customer-milestone-3

How To Run

To run this version of project on a machine, following steps are needed:

1. System Configuration

x86-64, Ubuntu 22.04 and 2GB RAM configuration is recommended.

2. Object Store

For the storage of 3D Model file objects, access to GCP (Google Cloud Platform) Cloud Storage service is necessary.

3. Database

To run the project, PostgreSQL installation is required. Execution of the following bash commands on Ubuntu/Linux can be used:

sudo apt update
sudo apt install -y postgresql postgresql-contrib
sudo systemctl start postgresql
sudo systemctl enable postgresql
sudo -i -u postgres bash <<EOF
createdb threedesign
psql -c "CREATE USER postgres WITH PASSWORD 'psqldev2024';"
psql -c "GRANT ALL PRIVILEGES ON DATABASE threedesign TO postgres;"
EOF

The database "threedesign" will be initialized when the backend of the project runs for the first time.

4. Docker Installation

To run backend and frontend, using docker containers are recommended. So, install and verify docker installation with the following bash commands:

sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
sudo docker --version
sudo systemctl status docker
sudo usermod -aG docker $USER

Restart bash connection. Then, verify docker installation with the following command:

docker run hello-world

5. Backend Deployment

Pull/clone latest code from main branch. Database and bucket configuration is defined in the following file (it can be edited with your corresponding configuration):

bounswe2024group8/3Design/backend/threedesign/src/main/resources/application.properties

After the configuration is done, use following commands to run backend:

cd bounswe2024group8/3Design/backend/
docker build -t backend:1.0 -f Dockerfile ./threedesign/
docker run -d -v /path/to/gcp/pamkeyfile.json:/key.json -e GOOGLE_APPLICATION_CREDENTIALS=/key.json --name backend --rm -p 8080:8080 --network host backend:1.0
docker exec backend /bin/bash -c "nohup java -jar /app/target/threedesign-0.0.1-SNAPSHOT.jar &"

The pamkeyfile.json file is the GCP Service Account Key file, that is used for accessing GCP Cloud Storage Bucket. It is generated and can be obtained on GCP Service Accounts page.

6. Frontend Deployment

Pull/clone latest code from main branch. Edit the file below for backend URL configuration:

bounswe2024group8/3Design/frontend/.env

After the configuration is done, use the following commands to run frontend:

cd bounswe2024group8/3Design/frontend/
docker build -t frontend:1.0 -f Dockerfile ./
docker run -d --name frontend -p 3000:3000 --network host frontend:1.0

Deployment

This version can be accessed on the following URLs:

For mobile, the APK file shared in this release report.