Migrating from 1.0 version to 2.0
On May 2021, Horusec made a change in its Github repositories:
-
Now, the main repository https://github.com/ZupIT/horusec will be Horusec-CLI property.
-
All the Web application was migrated to the https://github.com/ZupIT/horusec-platform repository.
With that, all the following services have a new repository:
Other changes also happened:
- Horusec-Vulnerability was created, a new service responsible to manage all the vulnerabilities found on Horusec-CLI.
- Horusec-Account service was renamed to Horusec-Core, it will represent better its function in the platform.
Requisites:
Check out below the requirements in the 2.0 version:
- RabbitMQ: minor version 3.0;
- PostgreSQL: minor version 11.6;
Postgresql was already a requirement in Horusec’s older version, with only one database and the name was suggested by Horusec’s team in its configuration files.
horusec_db
Now, the new version, you need to create a new database on PostgreSQL and the name was suggested by Horusec’s team in its configuration file:
horusec_analytic_db
It was necessary to separate the database because the Horusec-API service is loaded with a lot of writing and Horusec-Analytic with reading and these are the critical points of the solution, it has a high availability.
Optional:
There wasn’t a new change on the optional requirement, it continues:
- A connection with a server SMTP for triggering e-mails.
Migration:
To continue the migration, follow the next steps:
Step 1: Update the services with the lastest version available:
- Horusec-API
- Horusec-Analytic
- Horusec-Auth
- Horusec-Webhook
- Horusec-Messages
- Horusec-Vulnerability
- Horusec-Core
Step 2: Perform the data synchronization to a new version:
- Add the environment variables and its values in the Horusec-Analytic service:
Environment variables | Values |
---|---|
HORUSEC_DATABASE_SQL_URI | postgresql://root:root@postgresql:5432/horusec_analytic_db?sslmode=disable |
HORUSEC_DATABASE_HORUSEC_SQL_URI | {{CONNECTION WITH THE EXISTING DATABASE}} |
-
Helm: If you are using helm, a job inside the helm’s files was already added to be triggered when a new version is executed.
-
Docker-Compose: If you are using docker-compose, it is necessary to run the migration script of from the older version to the newer. To do that, run the following commands:
docker exec \
-e HORUSEC_DATABASE_SQL_URI=postgresql://root:root@postgresql:5432/horusec_analytic_db?sslmode=disable \
-e HORUSEC_DATABASE_HORUSEC_SQL_URI=postgresql://root:root@postgresql:5432/horusec_analytic_db?sslmode=disable \
-i horusec-analytic /analytic/horusec-analytic-v1-to-v2-migrate
docker exec \
-e HORUSEC_DATABASE_SQL_URI=postgresql://root:root@postgresql:5432/horusec_analytic_db?sslmode=disable \
-i horusec-api /api/horusec-api-v1-to-v2-migrate
Step 3: Update the CLI to the lastest version.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.