en
Language
  • en
  • cs
  • hu
  • it
  • es
  • fr
  • de
  • ru

Easy virtual machine (VM)

Introduction

This documentation is for virtual machines (VM) provided by Easy Software for Clients who bought Server solution. It is valid for VMs generated after November 2024 with embedded Docker. If you are still using VM with legacy installation, we strongly recommend transfering to this dockerized VM, or to native Docker installation. More details about Docker available here.

It may also serve as inspiration of your own server environment, but in such case there are no guarantees due to the variety of possible components and technologies you may be using.

The VM is configured just for small sites (cca 10 simultanously working users). VM is almost production ready but REQUIRES experienced administrator to install VM in your environment, set up backuping, monitoring, networking, security policies etc. Easy Software can not take responsibility for running of this VM in your dedicated environment, the VM is an example how the application can be hosted.

This post addresses "Application", which can be substituted by "Easy Project". 

First steps

Because the VM was generated at a certain point in time, it is possible that some components may have already released some patches or security fixes by the time you are deploying it.
That is why you should always start with a backup followed by update of the OS. It will install the latest security fixes and update possibly outdated components.

VM description

OS is Debian in 64-bit edition.

The important defaults are:

  • OS is available by SSH via port 22
  • Firewall is not set (it is up to system administrators)
  • The disk is ~20 GB
    • /boot 512M
    • /19G
    • swap 512M
    • to increase disk, use the available LVM
  • Application listens on HTTPS but with self-signed certificate, so you have to replace it ASAP (more details below)
  • Application is running in /home/easy/docker.

Linux login:

  • username: easy
  • password: e4syPwd-

Please change it ASAP. To do so run command passwd in terminal

Mysql login:
Simply use command mysql for connecting to the databse

Application login:
Default login (in case of "clean" database) is

  • username: admin
  • password: admin

The default login for the VM with the demo data is:

  • username: manager
  • password: easy848

In case of database from your Cloud application, passwords remain as you had them.


Structure of the application's home

.
├── .my.cnf                   # configuration for mysql connection
└── docker
    ├── docker-compose.yml    # docker compose file, assembles docker stack        
    ├── env.EXAMPLE           # contains variable examples that can be used
    ├── .env                  # production variables for application and DB
    ├── files                 # attachments and other files  
    ├── nginx.conf            # nginx proxy settings, that are in use
    ├── README.md             # README with other useful informations


Customer responsibilities

The VM runs on the latest recomended version of Debian. The system requires common maintenance like:

  • regular updates
  • resource monitoring (free space, memory usage, load, ...)
  • data backups to an independent disk
  • security policies

Updates

Do security updates of the system frequently. We recommend to do it at least once per week. Before update please be sure that latest backup is available and working.

Official documentation how to run only security updates https://wiki.debian.org/UnattendedUpgrades

Resource monitoring

Easy Software has good experience with Prometheus. 

The official very basic documentation for Node Exporter and Prometheus is at https://prometheus.io/docs/guides/node-exporter/ 

The best quickstart grafana dashboard is at https://grafana.com/grafana/dashboards/1860

Depending on your usage you should tune the VM resource settings, for example increase amount of RAM or number of cores provided to VM. All these configurations should be regularly done by your virtual environment administrator.

If you need full environment support from Easy Software (security and performance optimizations, backuping, monitoring, etc), we recommend to transfer to our Cloud solutions.


Data backups

The preconfigured backuping that is present in the VM is a working example, that needs to be fit to your infrastructure and has to be monitored. Please keep in mind, that a proper backup should be:

  • checked after backup process finished (check at least the size of the backup)
  • kept in a safe place
  • distant from the running environment (at least in a different city)
  • restored once in a while to test your ability to perform recovery

The application stores data in two places, so don't forget to backup both of them.

DB

Database backup can be very easily done incorrectly. The best and the most secure way how to do backups of mysql database is via database dump as you can see in the example script. It makes version independent backups, that could be restored whole or allows you to get only part of the old data.

Example:

mysqldump --add-drop-tables --routines --triggers --flush-logs $DATABASE_NAME > path/to/file_where_db_will_be_stored.sql

Copying files from /var/lib/mysql is an INCORRECT way of saving DB backups.

Files

Every uploaded file/attachment in the application is stored in /home/easy/docker/files . The whole content of this directory should be backed up. In this case, you can simply copy the contents.

Security policies

No external SSH keys are included. Firewall is not set.

Migrate data to this VM

How to import older Application or Redmine data (SOURCE) into VM (TARGET). This works in most cases, but this procedure may not work in case you use 3rd party plugins in your source Redmine instance.

1. from your (SOURCE) create MySQL dump file:

mysqldump --opt easy > backup.sql

2. transfer backup.sql into (TARGET)

3. go to Application container  on (TARGET)

docker exec -it docker-app-1 bash

4. recreate (TARGET) database

bbundle exec rake db:drop db:create RAILS_ENV=production DISABLE_DATABASE_ENVIRONMENT_CHECK=1

- leave the container: 

exit

5. import backup.sql

mysql [db_name] < backup.sql

6. transfer attachments and other files from (SOURCE)[redmine]/files into (TARGET)/home/docker/files

7. Go to application container again on (TARGET):

docker exec -it docker-app-1 bash

8. run:

bundle exec rake easyproject:install RAILS_ENV=production

-Leave the container

exit

9. restart application. 

in /home/easy/docker run the following:

docker compose down; docker compose up -d


Try Easy Project in 30 days free trial

Access all features, SSL protected, no credit card required.