You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dev-docs/dev-deployment.md
+133-2Lines changed: 133 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,10 @@ You will need to have the following
13
13
* A running kubernetes cluster with at least 2000 mCPU and 4GB RAM available.
14
14
* Helm 3 installed
15
15
* The latest version of kubectl installed, and credentials configured to talk to the cluster
16
-
* A RabbitMQ cluster running the latest available version.
16
+
* A RabbitMQ cluster running the latest available version. (see also [install RabbitMQ](#own-rabbitmq-in-cluster))
17
17
The deployment process requires administrative access (the RabbitMQ management API) and creates multiple users.
18
18
The free levels of CloudAMQP's service do not support this.
19
-
* A Postgres server running Postgres 11.x (see below for Google Cloud SQL, or use another provider).
19
+
* A Postgres server running Postgres 11.x (see below for Google Cloud SQL, or use another provider). (see also [install Postgres](#own-postgres-in-cluster))
20
20
The Postgres server must be initialized with the `en_US.utf8` locale; see [the deployment docs](../ui/docs/manual/deploying/database.mdx).
21
21
* An AWS account and an IAM user in that account
22
22
Set up your `aws` command-line to use the IAM user (`aws configure`).
@@ -222,3 +222,134 @@ If you set up a taskcluster-github app, you probably want to test a variety of i
222
222
2. Put together a body of your pulse message. Make sure you use the schemas. It should be in JSON format.
223
223
3. Look up the routing key and exchange you need (most likely you are testing a handler - so look up the bindings for that handler in the code).
224
224
3. Navigate to the management UI on the RabbitMQ server (the url from `pulseHostname`), login using the above credentials and go to the exchange of interest. You will see *Publish Message* section in the UI. Fill out the *Routing Key* and *Payload* fields (the result of the step 2 goes into the latter). Press *Publish Message* and you're done.
225
+
226
+
## Own RabbitMQ in cluster
227
+
228
+
It is possible to run RabbitMQ directly in the same cluster for dev purposes.
229
+
230
+
Warning: by using this approach, you are responsible for maintenance and backups.
231
+
232
+
You can use one of the existing helm charts, steps listed below:
2. To enable TLS you need to create certificates according to [RabbitMQ Documentation](https://www.rabbitmq.com/ssl.html#automated-certificate-generation)
You are now able to access it via <http://localhost:15672> using username and password configured in `rabbitmq/values.yaml`.
285
+
286
+
6. Ensure that vhost and users are created.
287
+
288
+
In your `dev-config.yml` (that is created with `yarn dev:init`) you should have `meta.rabbitAdminManagementOrigin = http://127.0.0.1:15672` to be able to properly access it
289
+
290
+
Run `yarn dev:ensure:rabbit` to create missing users and vhost. It will prompt for management password (see `rabbitmq/values.yaml`), and assumes that `dev-config.yml` was already generated.
291
+
292
+
7. Update `dev-config.yml` to have:
293
+
294
+
`pulseHostname = tc-rabbitmq-headless` if running in the same namespace, or `pulseHostname: tc-rabbitmq-headless.$NAMESPACE.svc.cluster.local` otherwise
295
+
296
+
In case of connection issues, set non tls mode with `pulseAmqps = false`
297
+
298
+
8. Run `yarn dev:apply` if needed, to recreate configs and secrets with new pulse values.
299
+
300
+
## Own Postgres in cluster
301
+
302
+
It is possible to run Postgres directly in the same cluster for dev purposes.
303
+
304
+
Warning: by using this approach, you are responsible for maintenance and backups.
You are now able to connect to it via <http://localhost:5432> using username and password configured in `postgres/values.yaml`.
344
+
345
+
5. Ensure that users are created.
346
+
347
+
In your `dev-config.yml` (that is created with `yarn dev:init`) you should have `meta.dbPrivateIp = tc-postgresql.$NAMESPACE.svc.cluster.local` to be able to properly access it
348
+
349
+
`yarn dev:ensure:db`will create all necessary users for all services
350
+
351
+
6. Migrate database
352
+
353
+
Once users are set, you can run `yarn dev:db:upgrade` (with running port-forward) to create db schema and stored functions
354
+
355
+
Now it should be possible to use postgres for dev purposes inside the cluster. Make sure to make backups.
0 commit comments