If you are using sudo
to launch commands with administrator permissions, your password will be requested.
Deploying OpenProject with a Database for PostgreSQL
- OpenProject
- database
- PostgreSQL
- ubuntu
OpenProject is an open-source project management software. Available in more than 30 languages, it provides tools and features to assist teams with communication, collaboration, and navigating the lifecycle of a project.
The software helps users to organize projects from their initial stages of conception, initiation, definition and planning, to their launch or execution and provides tools for project performance, control, and closure.
In this tutorial, you will learn how to install and configure OpenProject on an Instance running Ubuntu Focal Fossa 20.04 while integrating a PostgreSQL Database into your stack.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- An SSH key
- An Instance running on Ubuntu 22.04 (Jammy)
sudo
privileges or access to the root user- Configured an A-record pointing to your Instance’s IP address
Installing OpenProject
- Connect to your Instance via SSH.
- Update and upgrade the system to the latest version available in Ubuntus repositories. Then, install the
apt-transport-https
package, which allows the use of repositories accessed via the HTTP Secure protocol (HTTPS).apt update && apt -y upgradeapt -y install apt-transport-https ca-certificates wget - Use the following command to import the PGP key used to sign Open Project packages:
sudo wget -O /etc/apt/trusted.gpg.d/openproject.asc https://dl.packager.io/srv/opf/openproject/keyNote
- Add the OpenProject repository:
wget -O /etc/apt/sources.list.d/openproject.list \https://dl.packager.io/srv/opf/openproject/stable/12/installer/ubuntu/22.04.repo
- Update the
apt
package list and install the OpenProject Community Edition.apt-get updateapt-get -y install openproject
Creating a database for PostgreSQL
Since OpenProject requires a PostgreSQL database to run, we will be creating a Database for the PostgreSQL instance directly in the Scaleway console.
Follow the instructions to create a Database Instance. Ensure that you select PostgreSQL as the database engine.
Configuring the stack
You can easily configure your stack and dependencies with OpenProject’s installer. Carry out the following commands from your Instance.
-
Run the following command to open the installer:
openproject configure -
Select the Use an existing PostgreSQL database option to use your Database for PostgreSQL.
-
Insert the database IP. This is found in your Database Instance’s Overview tab, under Endpoint, and is the sequence of numbers before the :.
-
Enter the PostgreSQL port. This is found in your Database Instance’s Overview tab, under Endpoint, and is the sequence of numbers before the :.
-
Insert the username created for your Database.
And the corresponding password:
-
Enter the name of your Database Instance (displayed at the top of its Overview* page, or in the list of your Databases):
The installer offers the option of installing and configuring a web server using Apache.
-
Select Install apache2 server and press enter.
-
Insert the domain name pointed toward your Instance.
-
Set a path prefix. If you leave the field empty, the installation will be performed on the root of your domain.
The wizard will then ask if you wish to enable SSL/TLS.
-
Proceed by selecting No and pressing enter.
NoteWe will enable TLS to secure and encrypt connections between your users and the instance in a later step.
-
Choose between configuring Apache to automatically create and host SVN or Git repositories. If you wish to use SVN, select Install Subversion repository support. If you wish to use Git, select Skip and then Install Git repository support.
In this tutorial, we will install Git.
-
Enter the path to the directory that hosts the Git repositories and then the path to the git http backend CGI directory.
-
Select an e-mail application you wish to use to send e-mails from OpenProject and fill in the requested information or Skip.
-
Finally, install the Memcache server.
The installation completes.
You can access your OpenProject interface through the address http://<yourdomain.name>/<yourpathprefix>
on the web browser.
Installing an SSL/TLS certificate
To protect user’s credentials and other confidential information that will be stored in OpenProject, you can generate an SSL certificate issued by Let’s Encrypt for free.
For this purpose, we will be using a certbot.
-
Make sure the
universe
repository is enabled in Ubuntu.apt-get updateapt-get install software-properties-commonadd-apt-repository universeapt-get update -
Install
certbot
by running the command:apt-get install certbot -
Run
certbot
while specifying the webroot path as such:certbot certonly --webroot --webroot-path /opt/openproject/public -d domain.nameReplace
domain.name
by your domain name. -
Answer the questions when prompted by the certbot Wizard.
Enter email address (used for urgent renewal and security notices) (Enter 'c' tocancel):Insert your e-mail address.
Please read the Terms of Service athttps://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You mustagree in order to register with the ACME server athttps://acme-v02.api.letsencrypt.org/directory- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(A)gree/(C)ancel: AType
A
to agree.Would you be willing to share your email address with the Electronic FrontierFoundation, a founding partner of the Let's Encrypt project and the non-profitorganization that develops Certbot? We'd like to send you an email about our workencrypting the web, EFF news, campaigns, and ways to support digital freedom.- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(Y)es/(N)o:Choose
Y
es orN
o and input accordingly.The Wizard will then generate your certificate. Once done, it will provide you with the path of the certificate and the private key, as well as inform you of the expiration date of the certification.
Obtaining a new certificatePerforming the following challenges:http-01 challenge for openproject-scw.gaUsing the webroot path /opt/openproject/public for all unmatched domains.Waiting for verification...Cleaning up challengesIMPORTANT NOTES:- Congratulations! Your certificate and chain have been saved at:/etc/letsencrypt/live/yourdomain.name/fullchain.pemYour key file has been saved at:/etc/letsencrypt/live/yourdomain.name/privkey.pemYour cert will expire on 2020-10-20. To obtain a new or tweakedversion of this certificate in the future, simply run certbotagain. To non-interactively renew *all* of your certificates, run"certbot renew"- Your account credentials have been saved in your Certbotconfiguration directory at /etc/letsencrypt. You should make asecure backup of this folder now. This configuration directory willalso contain certificates and private keys obtained by Certbot somaking regular backups of this folder is ideal.Take note of the paths provided as they will be required in a later step.
Enabling TLS/SSL
-
Re-launch the OpenProject installer by running the command:
openproject reconfigureThe installation Wizard launches the same prompts as before. Select the same preferences and enter your answers, if necessary, until you reach the
server/ssl
screen. -
Select
Yes
and enter. When prompted, insert the path to your certificate:To your private key:
And a path to your CA bundle (if you have one).
Follow through the remaining prompts by entering < OK >
every time. The wizard will close, and your new configuration will be applied.
Accessing your OpenProject dashboard
To begin editing and configuring your OpenProject workspace you must log in.
- Open a web browser and enter
https://<yourdomain.name>/<yourpathprefix>/login
.TipIf you can’t reach the application from your browser, try running the following command to start the service:
service openproject start - Enter the following credentials to log in as the
admin
user:Upon the first login, you will be required to change your password.Username: adminPassword: admin
Once you have done so, you can begin managing your projects. OpenProject provides a documentation website and a user guide is available to help you get started with their different features.