From 6fe973913e3c23752d474bc281316278d8216574 Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Fri, 3 Jan 2025 15:49:21 +0100 Subject: [PATCH 1/4] Add docs for changing Hypernode settings in Hypernode Deploy --- ...figure-hypernode-settings-on-deployment.md | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md diff --git a/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md b/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md new file mode 100644 index 00000000..e9e0f279 --- /dev/null +++ b/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md @@ -0,0 +1,97 @@ +--- +myst: + html_meta: + description: Configure your Hypernode server on Deploytime to rapidly test upgrades + with service upgrades + title: Configure Hypernode settings on Deployment +--- + +# Configure Hypernode Settins on Deployment + +Hypernode Deploy allows you to change configrations to the Hypernode server on-the-fly and on deploytime, this is extremely befinitial when doing a MySQL upgrade or NodeJS versions controlled by your source version control. + +Here's a list of changes you can make to the Hypernode: + +- Hypernode Systemctl Configration +- Cron Configuration +- Nginx vhost Configration +- Supervisor Configuration +- Varnish Configuration + +## Hypernode Systemctl Configuration + +You can use Hypernode's systemctl utility to change crucial settings about the Hypernode server. This can also be configured in your deployments. More information about the systemctl utility can be found [here](../../hypernode-platform/tools/how-to-use-the-hypernode-systemctl-cli-tool.md). + +You can simply define these setting configuration by using this code in your `deploy.php` file: + +```php +$configuration->setPlatformConfigurations([ + new PlatformConfiguration\HypernodeSettingConfiguration('supervisor_enabled', 'True'), + new PlatformConfiguration\HypernodeSettingConfiguration('rabbitmq_enabled', 'True'), + new PlatformConfiguration\HypernodeSettingConfiguration('elasticsearch_enabled', 'False'), + new PlatformConfiguration\HypernodeSettingConfiguration('opensearch_enabled', 'True'), + new PlatformConfiguration\HypernodeSettingConfiguration('varnish_enabled', 'True'), + new PlatformConfiguration\HypernodeSettingConfiguration('nodejs_version', '20'), +]); +``` + +## Cron Configuration + +Lots of applications need a set of cronjob for the application to function correctly. Instead of having to configure this on the server manually on each change, you can set this up on the Deployment. + +For example, start creating the `./etc/cron` folder and putting in the following: + +```crontab +* * * * * echo 'Hello world!' >> /data/web/cron.log +``` + +The contents of this file will be written and get replaced to your crontab as its own block on each deployment, this makes it easy manage and update the crons. + +Now add the cron configuration to your `deploy.php` + +```php +$configuration->setPlatformConfigurations([ + new PlatformConfiguration\CronConfiguration('etc/cron') +]); +``` + +## Nginx vhost Configration + +You can use Hypernode Deploy to apply nginx configurations set to your vhost, you do this by creating a new folder for your nginx configurations in `./etc/nginx` and placing your configs there. + +```{note} +All existing nginx configurations will be replaced on first deployment when there's already nginx configurations known for this vhost name. +``` + +Now add the nginx configuration to your `deploy.php` + +```php +$configuration->setPlatformConfigurations([ + new PlatformConfiguration\NginxConfiguration('etc/nginx') +]); +``` + +## Supervisor Configuration + +Setting up a supervisor configuration is sometimes a requirement for your application, you can easily do this by creating the `./etc/supervisor` folder and creating the supervisor files. + +For example, create your `./etc/supervisor/application.conf` file and adding the supervisor configuration to your `deploy.php` + +```php +$configuration->setPlatformConfigurations([ + new PlatformConfiguration\SupervisorConfiguration('etc/supervisor') +]); +``` + +## Varnish Configuration + +You can update your varnish configuration by adding the file at `etc/varnish.vcl` , and configuring it in `deploy.php` like so: + +```php +$configuration->setPlatformConfigurations([ + new PlatformConfiguration\VarnishConfiguration( + $configFile: 'etc/varnish.vcl', + $version: '7.x' + ) +]); +``` From c8f529de2afe389e102a732cdada669d7d2fe5d9 Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Fri, 3 Jan 2025 16:05:45 +0100 Subject: [PATCH 2/4] Fix formatting issues --- docs/hypernode-deploy/getting-started.md | 1 + .../configure-hypernode-settings-on-deployment.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/hypernode-deploy/getting-started.md b/docs/hypernode-deploy/getting-started.md index a23a978b..29dfaaf2 100644 --- a/docs/hypernode-deploy/getting-started.md +++ b/docs/hypernode-deploy/getting-started.md @@ -15,4 +15,5 @@ maxdepth: 1 --- getting-started/install-and-configure-hypernode-deploy.md getting-started/configure-ci-cd.md +getting-started/configure-hypernode-settings-on-deployment.md ``` diff --git a/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md b/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md index e9e0f279..d9072ba5 100644 --- a/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md +++ b/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md @@ -6,7 +6,7 @@ myst: title: Configure Hypernode settings on Deployment --- -# Configure Hypernode Settins on Deployment +# Configure Hypernode settings on Deployment Hypernode Deploy allows you to change configrations to the Hypernode server on-the-fly and on deploytime, this is extremely befinitial when doing a MySQL upgrade or NodeJS versions controlled by your source version control. @@ -41,7 +41,7 @@ Lots of applications need a set of cronjob for the application to function corre For example, start creating the `./etc/cron` folder and putting in the following: -```crontab +```bash * * * * * echo 'Hello world!' >> /data/web/cron.log ``` From 815fcfbaaae009b4ae32f5eb0738c461f45c174a Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Fri, 3 Jan 2025 16:13:01 +0100 Subject: [PATCH 3/4] Improve formatting issues --- .../configure-hypernode-settings-on-deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md diff --git a/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md b/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md old mode 100644 new mode 100755 index d9072ba5..2015d467 --- a/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md +++ b/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md @@ -1,7 +1,7 @@ --- myst: html_meta: - description: Configure your Hypernode server on Deploytime to rapidly test upgrades + description: Configure your Hypernode server on Deploytime to rapidly test upgrades with service upgrades title: Configure Hypernode settings on Deployment --- From f83122a208a56de230d55d3dcd2b616b612f78fa Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Mon, 6 Jan 2025 09:42:52 +0100 Subject: [PATCH 4/4] Fix typos in configure-hypernode-settings-on-deployment doc --- ...nfigure-hypernode-settings-on-deployment.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md b/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md index 2015d467..8b13d6b1 100755 --- a/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md +++ b/docs/hypernode-deploy/getting-started/configure-hypernode-settings-on-deployment.md @@ -8,13 +8,13 @@ myst: # Configure Hypernode settings on Deployment -Hypernode Deploy allows you to change configrations to the Hypernode server on-the-fly and on deploytime, this is extremely befinitial when doing a MySQL upgrade or NodeJS versions controlled by your source version control. +Hypernode Deploy allows you to change configurations to the Hypernode server on-the-fly and on deploy time, this is extremely beneficial when doing a MySQL upgrade or Node.js versions controlled by your source version control. Here's a list of changes you can make to the Hypernode: -- Hypernode Systemctl Configration +- Hypernode Systemctl Configuration - Cron Configuration -- Nginx vhost Configration +- Nginx vhost Configuration - Supervisor Configuration - Varnish Configuration @@ -22,7 +22,7 @@ Here's a list of changes you can make to the Hypernode: You can use Hypernode's systemctl utility to change crucial settings about the Hypernode server. This can also be configured in your deployments. More information about the systemctl utility can be found [here](../../hypernode-platform/tools/how-to-use-the-hypernode-systemctl-cli-tool.md). -You can simply define these setting configuration by using this code in your `deploy.php` file: +You can simply define these settings configurations by using this code in your `deploy.php` file: ```php $configuration->setPlatformConfigurations([ @@ -37,7 +37,7 @@ $configuration->setPlatformConfigurations([ ## Cron Configuration -Lots of applications need a set of cronjob for the application to function correctly. Instead of having to configure this on the server manually on each change, you can set this up on the Deployment. +Lots of applications need a set of cron jobs for the application to function correctly. Instead of having to configure this on the server manually on each change, you can set this up on the Deployment. For example, start creating the `./etc/cron` folder and putting in the following: @@ -45,7 +45,7 @@ For example, start creating the `./etc/cron` folder and putting in the following * * * * * echo 'Hello world!' >> /data/web/cron.log ``` -The contents of this file will be written and get replaced to your crontab as its own block on each deployment, this makes it easy manage and update the crons. +The contents of this file will be written and get replaced to your crontab as a separate block on each deployment, this makes it easy to manage and update the crons. Now add the cron configuration to your `deploy.php` @@ -55,9 +55,9 @@ $configuration->setPlatformConfigurations([ ]); ``` -## Nginx vhost Configration +## Nginx vhost Configuration -You can use Hypernode Deploy to apply nginx configurations set to your vhost, you do this by creating a new folder for your nginx configurations in `./etc/nginx` and placing your configs there. +You can use Hypernode Deploy to apply nginx configurations set up for your vhost, you do this by creating a new folder for your nginx configurations in `./etc/nginx` and placing your configs there. ```{note} All existing nginx configurations will be replaced on first deployment when there's already nginx configurations known for this vhost name. @@ -85,7 +85,7 @@ $configuration->setPlatformConfigurations([ ## Varnish Configuration -You can update your varnish configuration by adding the file at `etc/varnish.vcl` , and configuring it in `deploy.php` like so: +You can update your varnish configuration by adding a file at `etc/varnish.vcl` , and configuring it in `deploy.php` like so: ```php $configuration->setPlatformConfigurations([