Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Allow white-label and internationalise Lagoon docs #3703

Merged
merged 5 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/_data/defaults.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: example.com
webhookhandler: webhook.example.com
sshport: 22
sshhostname: ssh.example.com
apiaddress: api.example.com
helpstring: your Lagoon administrator
helpstring_ja: Lagoon 管理者

## Comment out any of the above, and uncomment the corresponding below to see the variables in action
# name: amazee.io
# webhookhandler: webhook.amazeeio.cloud
# sshport: 32222
# sshhostname: ssh.amazeeio.cloud
# apiaddress: api.amazeeio.cloud
# helpstring: "[amazee.io support](https://support.amazee.io)"
# helpstring: "[amazee.io support](mailto:support@amazee.io)"
22 changes: 11 additions & 11 deletions docs/applications/drupal/first-deployment-of-drupal.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ git push

This will trigger a push, and the Git hosting will inform Lagoon about this push via the configured webhook.

If all is correct, you will see a notification in your configured chat system (this is configured by your friendly Lagoon administrator):
If all is correct, you will see a notification in your configured chat system. \(Contact {{ defaults.helpstring }} to configure this\):

![Slack notification of a deployment starting.](../../images/first_deployment_slack_start.jpg)

This tells you that Lagoon has just started to deploy your code. Depending on the size of the codebase and amount of containers, this will take a couple of seconds. Just relax. If you'd like to know what's happening now, check out the [Build and Deploy Process of Lagoon](../../concepts-basics/build-and-deploy-process.md).

You can also check your Lagoon UI to see the progress of any deployment (your Lagoon administrator has the info).
You can also check your Lagoon UI to see the progress of any deployment. \(Contact {{ defaults.helpstring }} for the URL if you don't have it\).

## 3. A fail

Depending on the post-rollout tasks defined in `.lagoon.yml` , you might have run some tasks like `drush updb` or `drush cr`. These Drush tasks depend on a database existing within the environment, which obviously does not exist yet. Let's fix that! Keep reading.
Depending on the post-rollout tasks defined in `.lagoon.yml`, you might have run some tasks like `drush updb` or `drush cr`. These Drush tasks depend on a database existing within the environment, which obviously does not exist yet. Let's fix that! Keep reading.

## 4. Synchronize local database to the remote Lagoon environment

Expand All @@ -38,7 +38,7 @@ With full Drush site alias support in Lagoon, you can synchronize a local databa
!!! warning
You may have to tell pygmy about your public keys before the next step.

If you get an error like `Permission denied (publickey)`, check out the documentation here: [pygmy - adding ssh keys](https://pygmy.readthedocs.io/en/master/ssh_agent)
If you get an error like `Permission denied (publickey)`, check out the documentation here: [pygmy - adding ssh keys](https://pygmy.readthedocs.io/en/master/ssh_agent).

First let's make sure that you can see the Drush site aliases:

Expand All @@ -65,12 +65,12 @@ You should see something like:

```bash title="Drush sql-sync results"
[drupal-example]cli-drupal:/app$ drush sql-sync @self @develop
You will destroy data in ssh.lagoon.amazeeio.cloud/drupal and replace with data from drupal.
You will destroy data in {{ defaults.sshhostname }}/drupal and replace with data from drupal.
Do you really want to continue? (y/n): y
Starting to dump database on Source. [ok]
Database dump saved to /home/drush-backups/drupal/20180227075813/drupal_20180227_075815.sql.gz [success]
Starting to discover temporary files directory on Destination. [ok]
You will delete files in drupal-example-develop@ssh.lagoon.amazeeio.cloud:/tmp/drupal_20180227_075815.sql.gz and replace with data from /home/drush-backups/drupal/20180227075813/drupal_20180227_075815.sql.gz
You will delete files in drupal-example-develop@{{ defaults.sshhostname }}:/tmp/drupal_20180227_075815.sql.gz and replace with data from /home/drush-backups/drupal/20180227075813/drupal_20180227_075815.sql.gz
Do you really want to continue? (y/n): y
Copying dump file from Source to Destination. [ok]
Starting to import dump file onto Destination database.
Expand All @@ -87,7 +87,7 @@ This time all should be green:

![Deployment Success!](../../images/first_deployment_slack_success.jpg)

Click on the links in the notification, and you should see your Drupal site loaded in all its beauty! It will probably not have images yet, which we will handle in [Step 6](./first-deployment-of-drupal.md#6-synchronize-local-files-to-the-remote-lagoon-environment).
Click on the links in the notification, and you should see your Drupal site loaded in all its beauty! It will probably not have images yet, which we will handle in [Step 6](./first-deployment-of-drupal.md#5-synchronize-local-files-to-the-remote-lagoon-environment).

If it is still failing, check the logs link for more information.

Expand All @@ -103,19 +103,19 @@ It should show you something like:

```bash title="Drush rsync results"
[drupal-example]cli-drupal:/app$ drush rsync @self:%files @develop:%files
You will delete files in drupal-example-develop@ssh.lagoon.amazeeio.cloud:/app/web/sites/default/files and replace with data from /app/web/sites/default/files/
You will delete files in drupal-example-develop@{{ defaults.sshhostname }}:/app/web/sites/default/files and replace with data from /app/web/sites/default/files/
Do you really want to continue? (y/n): y
```

In some cases, though, it might not look correct, like here:

```bash title="Drush rsync results"
[drupal-example]cli-drupal:/app$ drush rsync @self:%files @develop:%files
You will delete files in drupal-example-develop@ssh.lagoon.amazeeio.cloud:'/app/web/%files' and replace with data from '/app/web/%files'/
You will delete files in drupal-example-develop@{{ defaults.sshhostname }}:'/app/web/%files' and replace with data from '/app/web/%files'/
Do you really want to continue? (y/n):
```

The reason for that is that the Drupal cannot resolve the path of the files directory. This most probably has to do that the Drupal is not fully configured or has a missing database. For a workaround you can use `drush rsync @self:sites/default/files @develop:sites/default/files`, but we suggest that you actually check your local and remote Drupal \(you can test with `drush status` to see if the files directory is correctly configured\).
The reason for that is that the Drupal cannot resolve the path of the files directory. This most probably has to do with Drupal not being fully configured or having a missing database. For a workaround you can use `drush rsync @self:sites/default/files @develop:sites/default/files`, but we suggest that you actually check your local and remote Drupal \(you can test with `drush status` to see if the files directory is correctly configured\).

## 6. It's done

Expand All @@ -141,4 +141,4 @@ That's the beauty of Lagoon: it's exactly the same: Push the branch name you def
Did the deployment fail? Oh no! But we're here to help:

1. Click on the `logs` link in the error notification. It will tell you where in the deployment process the failure happened.
2. If you can't figure it out, ask your Lagoon administrator, they are here to help!
2. If you can't figure it out, contact {{ defaults.helpstring }}, they are here to help!
4 changes: 2 additions & 2 deletions docs/concepts-advanced/environment-idling.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Lagoon can utilize the [Aergia controller](https://github.com/amazeeio/aergia-co

### How does an environment get idled?

The environment idler has many different configuration capabilities. Here are the defaults of a standard Lagoon installation \(these could be quite different in your Lagoon, check with your Lagoon administrator!\)
The environment idler has many different configuration capabilities. Here are the defaults of a standard Lagoon installation \(these could be quite different in your Lagoon, contact {{ defaults.helpstring }}!\)

* Idling is tried every 4 hours.
* Production environments are never idled.
Expand All @@ -25,4 +25,4 @@ The un-idling will take a couple of seconds, as the Kubernetes cluster needs to
Yes, there is a field `autoIdle` on the project \(impacts all environments\) and environment \(if you need to target just one environment\), as to whether idling is allowed to take place. A value of `1` indicates the project/environment is eligible for idling. If the project is set to `0` the environments will never be idled, even if the environment is set to `0`
The default is always `1`\(idling is enabled\).

Talk to your Lagoon administrator if you are unsure how to set these project/environment fields.
Contact {{ defaults.helpstring }} if you are unsure how to set these project/environment fields.
4 changes: 2 additions & 2 deletions docs/concepts-advanced/environment-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ But that's it. Lagoon itself handles `development` and `production` environments

There are a couple of things that will use this information:

* By default, `development` environments are idled after 4 hours with no hits \(don't worry, they wake up automatically\). It is also possible for your Lagoon administrator to disable auto-idling on a per-environment basis, just ask!
* By default, `development` environments are idled after 4 hours with no hits \(don't worry, they wake up automatically\). It is also possible for {{ defaults.helpstring }} to disable auto-idling on a per-environment basis, just ask!
* Our default Drupal `settings.php` files load additional settings files for `development.settings.php` and `production.settings.php` so you can define settings and configurations different per environment type.
* If you try to delete an environment that is defined as the production environment \(either via webhooks or REST\), Lagoon will politely refuse to delete the production environment, as it tries to prevent you from making a mistake. In order to delete a production environment, you can either change the `productionEnvironment` in the API or use the secret `forceDeleteProductionEnvironment: true` POST payload for the REST API.
* The Lagoon administrator might use the production environment information for some additional things. For example, at amazee.io we're calculating only the hits of the production environments to calculate the price of the hosting.
* Sometimes {{ defaults.helpstring }} might use the production environment information for some additional things, such as calculating only the hits of the production environments to calculate the price of the hosting.
2 changes: 1 addition & 1 deletion docs/concepts-advanced/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

This section covers some of the more advanced concepts in Lagoon. If you're new to Lagoon, start with [Basic Lagoon Concepts](../concepts-basics/index.md).

If you need help, contact your Lagoon administrator or reach out to the community and maintainers in our [Discord](../community/discord.md).
If you need help, contact {{ defaults.helpstring }} or reach out to the community and maintainers in our [Discord](../community/discord.md).
2 changes: 1 addition & 1 deletion docs/concepts-basics/building-blocks/groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

_Groups_ are made up of users who have roles. An organization can have one or more groups. Each project can be assigned one or more groups. Groups can be assigned to multiple projects. Groups are created independently of projects, and then assigned to them.

Organizations have a quota to limit the number of groups assigned to it. If you need to change the quota, please contact your Lagoon administrator.
Organizations have a quota to limit the number of groups assigned to it. If you need to change the quota, please contact {{ defaults.helpstring }}.
2 changes: 1 addition & 1 deletion docs/concepts-basics/building-blocks/organizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ An _organization_ is an entity which can contain one or more projects, groups, u

Organizations add a layer of structure to help imitate life - for example, you may be a project manager who creates an organization to reflect the team working on a specific site. So that organization would contain the project or projects that make up that site, all of the people who need access to work on the site as users in a group called _developers_, and maybe another group of people who just need access to Lagoon to view the site and any issues, called _viewers_, each with the appropriate roles.

Organizations have a quota to limit the number of projects, groups, notifications, and environments that can be assigned to it. If you need to change this quota, please contact your Lagoon administrator.
Organizations have a quota to limit the number of projects, groups, notifications, and environments that can be assigned to it. If you need to change this quota, please contact {{ defaults.helpstring }}.

[Learn more about how to interact with Organizations](../../interacting/organizations.md).
2 changes: 1 addition & 1 deletion docs/concepts-basics/building-blocks/roles.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Members of organizations can be given the following roles:

!!! info inline end "Changing Quotas"

If you need to change quotas, please contact your Lagoon administrator.
If you need to change quotas, please contact {{ defaults.helpstring }}.

An _organization owner_ can do everything to do with administering an organization aside from changing quotas. They can add and delete users, groups, projects, deploy targets, and notifcations

Expand Down
4 changes: 2 additions & 2 deletions docs/concepts-basics/docker-compose-yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ In many cases, Lagoon knows where that persistent storage needs to go. For examp
* `lagoon.persistent` - The **absolute** path where the persistent storage should be mounted (the above example uses `/app/web/sites/default/files/` which is where Drupal expects its persistent storage).
* `lagoon.persistent.name` - Tells Lagoon to not create a new persistent storage for that service, but instead mounts the persistent storage of another defined service into this service.
* `lagoon.persistent.size` - The size of persistent storage you require (Lagoon usually gives you minimum 5G of persistent storage, if you need more, define it here).
* `lagoon.persistent.class` - By default Lagoon automatically assigns the right storage class for your service (like SSDs for MySQL, bulk storage for Nginx, etc.). If you need to overwrite this, you can do so here. This is highly dependent on the underlying Kubernetes/OpenShift that Lagoon runs on. Ask your Lagoon administrator about this.
* `lagoon.persistent.class` - By default Lagoon automatically assigns the right storage class for your service (like SSDs for MySQL, bulk storage for Nginx, etc.). If you need to overwrite this, you can do so here. This is highly dependent on the underlying Kubernetes/OpenShift that Lagoon runs on. Contact {{ defaults.helpstring }} for this.

### Auto-generated Routes

Expand Down Expand Up @@ -210,7 +210,7 @@ By default, Lagoon expects that services from custom templates are rolled out vi
* `daemonset` - Expects a [`Daemonset`](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) object in the template for the service.
* `false` - Will not monitor any rollouts, and will just be happy if the template applies and does not throw any errors.

You can also overwrite the rollout for just one specific environment. This is done in [`.lagoon.yml`](lagoon-yml.md#environments-name-rollouts).
You can also overwrite the rollout for just one specific environment. This is done in [`.lagoon.yml`](lagoon-yml.md#environmentsnamerollouts).

## Docker Compose v2 compatibility

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts-basics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

This section covers some of the basic concepts in Lagoon. If you're already familiar with these, move on to [Advanced Lagoon Concepts](../concepts-advanced/index.md).

If you need help, contact your Lagoon administrator or reach out to the community and maintainers in our [Discord](../community/discord.md).
If you need help, contact {{ defaults.helpstring }} or reach out to the community and maintainers in our [Discord](../community/discord.md).
10 changes: 5 additions & 5 deletions docs/concepts-basics/lagoon-yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ that's important!):
!!! Info
If you plan to switch from a SSL certificate signed by a Certificate
Authority (CA) to a Let's Encrypt certificate, it's best to get in touch
with your Lagoon administrator to oversee the transition.
with {{ defaults.helpstring }} to oversee the transition.

### Monitoring a specific path

Expand All @@ -285,7 +285,7 @@ When [UptimeRobot](https://uptimerobot.com/) is configured for your cluster \(Ku
### Ingress annotations

!!! Warning
Route/Ingress annotations are only supported by projects that deploy into clusters that run nginx-ingress controllers! Check with your Lagoon administrator if this is supported.
Route/Ingress annotations are only supported by projects that deploy into clusters that run nginx-ingress controllers! Check with {{ defaults.helpstring }} if this is supported.

* `annotations` can be a YAML map of [annotations supported by the nginx-ingress controller](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/). This is specifically useful for easy redirects and other configurations.

Expand Down Expand Up @@ -344,7 +344,7 @@ This example would trust the CIDR `1.2.3.4/32` \(the IP `1.2.3.4` in this case\)

### `Environments.[name].types`

The Lagoon build process checks the `lagoon.type` label from the `docker-compose.yml` file in order to learn what type of service should be deployed \(read more about them in the [documentation of `docker-compose.yml`](docker-compose-yml.md#custom-templates)\).
The Lagoon build process checks the `lagoon.type` label from the `docker-compose.yml` file in order to learn what type of service should be deployed \(read more about them in the [documentation of `docker-compose.yml`](docker-compose-yml.md#types)\).

Sometimes you might want to override the **type** just for a single environment, and not for all of them. For example, if you want a standalone MariaDB database \(instead of letting the Service Broker/operator provision a shared one\) for your non-production environment called `develop`:

Expand Down Expand Up @@ -510,14 +510,14 @@ poly-project2:
???+ Info
If you run directly on amazee.io hosted Lagoon you will not need this key set.

With the key `api` you can define another URL that should be used by the Lagoon CLI and `drush` to connect to the Lagoon GraphQL API. This needs to be a full URL with a scheme, like: `http://localhost:3000` This usually does not need to be changed, but there might be situations where your Lagoon administrator tells you to do so.
With the key `api` you can define another URL that should be used by the Lagoon CLI and `drush` to connect to the Lagoon GraphQL API. This needs to be a full URL with a scheme, like: `http://localhost:3000` This usually does not need to be changed, but there might be situations where {{ defaults.helpstring }} tells you to do so.

### `ssh`

???+ Info
If you run directly on amazee.io hosted Lagoon you will not need this key set.

With the key `ssh` you can define another SSH endpoint that should be used by the Lagoon CLI and `drush` to connect to the Lagoon remote shell service. This needs to be a hostname and a port separated by a colon, like: `localhost:2020` This usually does not need to be changed, but there might be situations where your Lagoon administrator tells you to do so.
With the key `ssh` you can define another SSH endpoint that should be used by the Lagoon CLI and `drush` to connect to the Lagoon remote shell service. This needs to be a hostname and a port separated by a colon, like: `localhost:2020` This usually does not need to be changed, but there might be situations where {{ defaults.helpstring }} tells you to do so.

### `container-registries`

Expand Down
Loading