Skip to content

Commit

Permalink
Correction nommage "Clever Cloud" dans la doc (#4369)
Browse files Browse the repository at this point in the history
* Add useful changelogs to the README

* Fix Clever Cloud brand name

* Fix link
  • Loading branch information
thbar authored Dec 10, 2024
1 parent 7654355 commit 1b989d3
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ To have an up to date database schema run `mix ecto.migrate`.
### Restoring the production database

The production database does not contains any sensitive data, you can retreive it for dev purpose.
* You can retrieve the [latest clever-cloud backup](https://console.clever-cloud.com/organisations/orga_f33ebcbc-4403-4e4c-82f5-12305e0ecb1b/addons/addon_beebaa5e-c3a4-4c57-b124-cf9d1473450a) (you need some permissions to access it, if you don't have them, you can ask someone on the team to give you the database)
* You can retrieve the [latest Clever Cloud backup](https://console.clever-cloud.com/organisations/orga_f33ebcbc-4403-4e4c-82f5-12305e0ecb1b/addons/addon_beebaa5e-c3a4-4c57-b124-cf9d1473450a) (you need some permissions to access it, if you don't have them, you can ask someone on the team to give you the database)
* On the clever-cloud website, under transport-site-postgresql, there is a Backups section with download links.
* restore the downloaded backup on you database: `./restore_db.sh <path_to_the_backup>`

Expand Down Expand Up @@ -130,7 +130,7 @@ If you need to login via `demo.data.gouv.fr`, follow these steps:

```elixir
config :oauth2, Datagouvfr.Authentication,
# go to CleverCloud staging site and pick `DATAGOUVFR_CLIENT_ID`
# go to Clever Cloud staging site and pick `DATAGOUVFR_CLIENT_ID`
client_id: "TODO-REPLACE",
# same but use `DATAGOUVFR_CLIENT_SECRET`
client_secret: "TODO-REPLACE"
Expand Down Expand Up @@ -280,9 +280,9 @@ The following domain names are currently in use by the deployed Elixir app:
* jobs: https://workers.prochainement.transport.data.gouv.fr
* proxy: https://proxy.prochainement.transport.gouv.fr

These names are [configured via a CNAME on CleverCloud](https://www.clever-cloud.com/doc/administrate/domain-names/#using-personal-domain-names).
These names are [configured via a CNAME on Clever Cloud](https://www.clever-cloud.com/doc/administrate/domain-names/#using-personal-domain-names).

The corresponding SSL certificates are auto-generated via Let's Encrypt and CleverCloud.
The corresponding SSL certificates are auto-generated via Let's Encrypt and Clever Cloud.

# Uptime monitoring (updown.io)

Expand All @@ -296,7 +296,7 @@ The following URLs are currently monitored via updown.io (with email & Mattermos

# Useful changelogs

* https://developers.clever-cloud.com/changelog/ for CleverCloud components (e.g. Postgres)
* https://developers.clever-cloud.com/changelog/ for Clever Cloud components (e.g. Postgres)
* [.tool-versions](.tool-versions) for Elixir & Erlang

# Blog
Expand Down
8 changes: 4 additions & 4 deletions apps/transport/lib/mix/tasks/logs.ex
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
defmodule Mix.Tasks.Clever.Logs do
@shortdoc "Fetches logs from CleverCloud"
@shortdoc "Fetches logs from Clever Cloud"

@moduledoc """
The CleverCloud logs command currently has strong limitations, including a maximum of
The Clever Cloud logs command currently has strong limitations, including a maximum of
1000 lines of logs per command invocation (https://github.com/CleverCloud/clever-tools/issues/429)
and a lack of auto-pagination.
Expand All @@ -14,10 +14,10 @@ defmodule Mix.Tasks.Clever.Logs do
mix clever.logs --since "2021-01-25T04:00:00Z" --before "2021-01-25T04:10:00Z" --alias "the-app"
```
The switches mimic the CleverCloud logs ones:
The switches mimic the Clever Cloud logs ones:
* `--since`: start time (ISO8601 Z). Defaults to "24 hours ago".
* `--before`: end time (ISO8601 Z). Defaults to "now".
* `--alias`: name of the CleverCloud app.
* `--alias`: name of the Clever Cloud app.
"""

require Logger
Expand Down
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ config :ex_aws,
access_key_id: System.get_env("CELLAR_ACCESS_KEY_ID"),
secret_access_key: System.get_env("CELLAR_SECRET_ACCESS_KEY"),
# The expected S3 owner of buckets/objects.
# For CleverCloud and the Cellar service, it looks like `orga-$UUID`
# For Clever Cloud and the Cellar service, it looks like `orga-$UUID`
cellar_organisation_id: System.get_env("CELLAR_ORGANISATION_ID"),
# ~s is a string parameter, it will be replaced by the bucket's name
cellar_url: "https://~s.cellar-c2.services.clever-cloud.com",
Expand Down
2 changes: 1 addition & 1 deletion config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ if config_env() == :prod do
end
end

# On CleverCloud, each container gets assigned a UUID, which gets propagated to AppSignal.
# On Clever Cloud, each container gets assigned a UUID, which gets propagated to AppSignal.
# It is easier to assign the container a "role" so that we can more easily charts relevant metrics.
host_role =
[]
Expand Down
2 changes: 1 addition & 1 deletion docs/upgrade_versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Une première image Docker est mise à disposition par le dépôt tranport-ops :

L’application transport-site récupère l’image Docker de transport-ops, et y rajoute uniquement son propre code, le compile, lance le serveur, les migrations, et expose le serveur à l’extérieur.

CircleCI pour les tests va donc faire ces étapes là de compilation du code Elixir, mais sans devoir reconstruire toute l’image (puisque s’appuyant sur l’image de transport-ops). Quand on pousse sur les serveurs de CleverCloud, un premier serveur va créer l’image Docker finale (mêmes étapes que sur CircleCI, donc un temps de compilation existe) puis déployer l’image résultante sur un autre serveur. Potentiellement, on pourrait réduire à l’avenir le temps de déploiement en fournissant directement l’image Docker avec l’application précompilée, et que la même image serve pour les tests et pour la production.
CircleCI pour les tests va donc faire ces étapes là de compilation du code Elixir, mais sans devoir reconstruire toute l’image (puisque s’appuyant sur l’image de transport-ops). Quand on pousse sur les serveurs de Clever Cloud, un premier serveur va créer l’image Docker finale (mêmes étapes que sur CircleCI, donc un temps de compilation existe) puis déployer l’image résultante sur un autre serveur. Potentiellement, on pourrait réduire à l’avenir le temps de déploiement en fournissant directement l’image Docker avec l’application précompilée, et que la même image serve pour les tests et pour la production.

## Processus de mise à jour

Expand Down
10 changes: 5 additions & 5 deletions learning_track.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ This guide tracks useful steps to learn how to maintain and modify this system.

### Read the logs from the production database

* The site is deployed on [CleverCloud](https://www.clever-cloud.com/)
* The site is deployed on [Clever Cloud](https://www.clever-cloud.com/)
* Install [`clever-tools`](https://github.com/CleverCloud/clever-tools)
* `clever login`
* `clever --help`
* Go to your local `transport-site` git clone
* `clever link $$REPLACE_BY_APP_ID$$` (pick `app_id` in the CleverCloud dashboard for `transport-site`)
* `clever link $$REPLACE_BY_APP_ID$$` (pick `app_id` in the Clever Cloud dashboard for `transport-site`)
* `clever status`
* `clever logs --help`
* `clever logs` to stream the current logs
Expand All @@ -77,14 +77,14 @@ This guide tracks useful steps to learn how to maintain and modify this system.
### Learn how to deploy the Elixir app on staging (aka "prochainement")

* Use a force push of your branch, e.g. `git push <remote> <branche>:prochainement -f` (so if your branch is `some-feature`, this will usually be: `git push origin some-feature:prochainement -f`)
* This will trigger a redeploy. Redeploy process can be monitored from the [CleverCloud dashboard](https://www.clever-cloud.com) and takes roughly 5 to 10 minutes.
* This will trigger a redeploy. Redeploy process can be monitored from the [Clever Cloud dashboard](https://www.clever-cloud.com) and takes roughly 5 to 10 minutes.
* If you see errors in the CC app logs due to Ecto migrations (due to divergence of branches), you'll want to reset the staging database (see below)

### Learn how to reset the staging (aka "prochainement") database

* Go to the CleverCloud dashboard for the production Postgres database and download it locally
* Go to the Clever Cloud dashboard for the production Postgres database and download it locally
* Read the [restore_db.sh](https://github.com/etalab/transport-site/blob/master/restore_db.sh) script
* Go to the CleverCloud dashboard for the **staging** Postgres database, and run `restore_db.sh` with proper parameters
* Go to the Clever Cloud dashboard for the **staging** Postgres database, and run `restore_db.sh` with proper parameters

### Learn how to connect via SSH

Expand Down
2 changes: 1 addition & 1 deletion restore_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Usage ./restore_db.sh <db_name> <host> <user_name> <password> <absolute_path_to_backup>
# or the ./restore_db.sh <absolute_path_to_backup> if the default options are ok for you
# the latest production backup can be fetched on "transport-site-postgresql" in clevercloud
# the latest production backup can be fetched on "transport-site-postgresql" in Clever Cloud
#
# With the flag `--skip-extensions`, you can also skip extensions restoration as those might require administrative
# rights your pg user doesn't have. Example:
Expand Down

0 comments on commit 1b989d3

Please sign in to comment.