ssn

field notes

User Tools

Site Tools


teach:lbaw:202122:tools

Computational resources §

LBAW · Databases and Web Applications Laboratory, 2021/22
L.EIC · Bachelor in Informatics and Computing Engineering
FEUP and FCUP, U.Porto

— 

This page describes the computational resources required for the development of the project. 

Git for Version Control §

Git is the version control system used in LBAW. Each group (gg) repository is at https://git.fe.up.pt/lbaw/lbaw2122/lbaw21gg. The teacher adds each student to the repository in the first class. 

Make sure you login in https://git.fe.up.pt/ before the first class, so that your account is created in the system. 

The repository's README file must include: 

  • Group reference (lbaw21gg) 
  • Project theme (e.g. “1. Collaborative news”) 
  • List of team members, including names and email addresses 

The group must ensure that the repository remains private, visible only by the team members and the teacher.  

Git Documentation | Git User Manual | A tutorial introduction to Git 

PostgreSQL for Data Persistence §

PostgreSQL is the database management system used in the course. 

A PostgreSQL production environment is available, which must be used in the application's production version. Each group (gg) will be provided with a PostgreSQL user account lbaw21gg, with the group password, and a database lbaw21gg available on the production machine (db.fe.up.pt). 

This service is managed by UPdigital and is only available using the VPN to FEUP

To configure a connection to the database, use the following settings: 

Host: db.fe.up.pt
Port: 5432
Database: lbaw21gg
Username: lbaw21gg
Password: <group password, given in class> 

For development, groups can use a local PostgreSQL instance through Docker containers. 

Instructions can be found at: https://git.fe.up.pt/lbaw/template-postgresql

About the PostgreSQL Production Environment §

A PostgreSQL database contains one or more schemas, which in turn contains one or more tables. All databases contain a public schema, which is used as default. In PostgreSQL's command line interface, you can view the current active schema with: 

show search_path; 

To change the schema for the current session use: 

SET search_path TO <schema>; 

In the PostgreSQL setup at FEUP (db.fe.up.pt), the public schema is shared between all accounts, i.e. tables created in the public schema are visible to all users (although not accessible). If you look at the tables in the publish schema, you will find a long list of tables. Thus, it is important to not use the public schema and instead create and use a schema with the name of your group (e.g. lbaw21gg). 

To create this schema, use the following command: 

CREATE SCHEMA <lbaw21gg>; 

To always use this schema as the default in your project, add the following line to the beginning of your SQL scripts. 

SET search_path TO <lbaw21gg>; 

PostgreSQL 11 Documentation | pgAdmin 

Docker, Laravel and PostgreSQL for Application Deployment §

Docker is used to deploy the application, both for the Vertical Prototype (A8) and the final product (A9). 

The group develops a web application using the Laravel server framework.  

The group starts the project by copying the files available at the template repository (https://git.fe.up.pt/lbaw/template-laravel) to their own repository, and then follow the instructions detailed in the README to set up the development requirements. 

The project uses the PostgreSQL database management system. A local instance is created using the bundled Docker compose file (see the README for the required steps to start it). 

The group should keep an up to date Docker image of their project in the group's container registry in GitLab (see the template README for the required steps). 

There is a practical guide available to help you build your prototype using the work done in the previous artefacts, namely A3, A6, and A7, see LBAW A8: Putting it all together  

Laravel documentation | Docker documentation 

Production Environment §

The group should follow the instructions in the template-laravel README file to keep the project up to date on their production environment. Using the FEUP VPN, the project will be available at http://lbaw21gg.lbaw.fe.up.pt.  

An update on the production environment is started 30 minutes after the last one completes. Note that updates might take some time, depending on the docker image sizes.  

teach/lbaw/202122/tools.txt · Last modified: 2021/12/13 17:37 by ssn

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki