Skip to content

Commit a738b43

Browse files
authored
Update platform-tips.md
1 parent aac6dd6 commit a738b43

File tree

1 file changed

+15
-105
lines changed

1 file changed

+15
-105
lines changed

user/enterprise/platform-tips.md

Lines changed: 15 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,18 @@ Then, please run:
6969

7070
## Clear Redis Archive Queue (V2.1.7 and prior)
7171

72-
In releases of Enterprise before 2.1.7, jobs where enqueued in the archive queue
72+
In Enterprise releases before 2.1.7, jobs were enqueued in the archive queue
7373
for log aggregation. Currently, this feature is available only for the hosted
7474
versions of Travis CI.
7575

76-
This results in the queue growing bigger and bigger, but not getting worked
77-
off. Because of that, Redis' memory consumption increases over the time and can
76+
This results in the queue growing bigger and bigger but not getting worked
77+
off. Because of that, Redis' memory consumption increases over time and can
7878
lead to decreased performance of the whole platform. The solution is to clear the `archive` queue to free system resources.
7979

80-
To clear it, please execute the following commands:
80+
To clear it, please execute the following command:
8181

8282
**TCIE 3.x**: `kubectl exec -it [travis-api-pod]j /app/script/console` *on your local machine*
8383

84-
**TCIE 2.x**: `$ travis console` *on Platform host*
85-
8684
Then, please run:
8785

8886
```
@@ -108,8 +106,6 @@ In the past, there have been reported cases where the system became unresponsive
108106

109107
**TCIE 3.x**: `kubectl exec -it [travis-api-pod]j /app/script/console` *on your local machine*
110108

111-
**TCIE 2.x**: `$ travis console` *on Platform host*
112-
113109
Then, please run:
114110

115111
```
@@ -147,70 +143,13 @@ On the worker machine, you need to run this command to remove travis-worker and
147143
$ sudo docker images | grep travis | awk '{print $3}' | xargs sudo docker rmi -f
148144
```
149145

150-
151-
## Uninstall Travis CI Enterprise 2.x
152-
153-
If you wish to uninstall Travis CI Enterprise 2.x from your platform and worker
154-
machines, please follow the instructions below. On the platform machine, you
155-
need to run the following commands in order. <small>(Instructions copied over
156-
from <a href="https://help.replicated.com/docs/native/customer-installations/installing-via-script/">Replicated</a>)</small>
157-
158-
### With Ubuntu 16.04 as host operating system
159-
160-
```sh
161-
sudo systemctl stop replicated
162-
sudo systemctl stop replicated-ui
163-
sudo systemctl stop replicated-operator
164-
sudo docker ps | grep "replicated" | awk '{print $1}' | xargs sudo docker stop
165-
sudo docker ps | grep "quay.io-travisci-te-main" | awk '{print $1}' | xargs sudo docker stop
166-
sudo docker rm -f replicated replicated-ui replicated-operator replicated-premkit replicated-statsd
167-
sudo docker images | grep "replicated" | awk '{print $3}' | xargs sudo docker rmi -f
168-
sudo docker images | grep "te-main" | awk '{print $3}' | xargs sudo docker rmi -f
169-
sudo rm -rf /var/lib/replicated* /etc/replicated* /etc/init/replicated* /etc/init.d/replicated* /etc/default/replicated* /var/log/upstart/replicated* /etc/systemd/system/replicated*
170-
```
171-
172-
On the worker machine, you need to run this command to remove travis-worker and all build images:
173-
174-
```sh
175-
$ sudo docker images | grep travis | awk '{print $3}' | xargs sudo docker rmi -f
176-
```
177-
178-
### With Ubuntu 14.04 as host operating system
179-
180-
```sh
181-
sudo service replicated stop
182-
sudo service replicated-ui stop
183-
sudo service replicated-operator stop
184-
sudo docker stop replicated-premkit
185-
sudo docker stop replicated-statsd
186-
sudo docker rm -f replicated replicated-ui replicated-operator replicated-premkit replicated-statsd
187-
sudo docker images | grep "quay\.io/replicated" | awk '{print $3}' | xargs sudo docker rmi -f
188-
sudo apt-get remove -y replicated replicated-ui replicated-operator
189-
sudo apt-get purge -y replicated replicated-ui replicated-operator
190-
sudo rm -rf /var/lib/replicated* /etc/replicated* /etc/init/replicated* /etc/init.d/replicated* /etc/default/replicated* /var/log/upstart/replicated* /etc/systemd/system/replicated*
191-
```
192-
193-
On the worker machine, you need to run this command to remove travis-worker:
194-
195-
```
196-
$ sudo apt-get autoremove travis-worker
197-
```
198-
199-
Additionally, please use the following command to clean up all Docker build images:
200-
201-
```
202-
$ sudo docker images | grep travis | awk '{print $3}' | xargs sudo docker rmi -f
203-
```
204-
205146
## Discover the Maximum Available Concurrency
206147

207148
To find out how much concurrency is available in your Travis CI Enterprise setup:
208149

209150

210151
**TCIE 3.x**: `kubectl exec -it travisci-platform-rabbitmq-ha-0 bash` *on your local machine*
211152

212-
**TCIE 2.x**: connect to your platform machine via SSH and run `$ travis bash`
213-
214153
Then, please run:
215154

216155
```
@@ -225,8 +164,6 @@ If you wish to find out how many worker machines are currently connected, please
225164

226165
**TCIE 3.x**: `kubectl exec -it travisci-platform-rabbitmq-ha-0 bash`
227166

228-
**TCIE 2.x**: connect to your platform machine via SSH and run: `$ travis bash`
229-
230167
Then, please run:
231168

232169
```
@@ -237,7 +174,7 @@ If you need to boot more worker machines, please see our docs about [installing
237174

238175
## Integrate Travis CI Enterprise into your Monitoring
239176

240-
To check if your Travis CI Enterprise 2.x/3.x installation is up and running, query the `/api/uptime` endpoint of your instance.
177+
To check if your Travis CI Enterprise 3.x installation is up and running, query the `/api/uptime` endpoint of your instance.
241178

242179
```
243180
$ curl -H "Authorization: token XXXXX" https://<your-travis-ci-enterprise-domain>/api/uptime
@@ -248,26 +185,24 @@ If everything is up and running, it answers with a `HTTP 200 OK`, or in case of
248185

249186
## Configure Backups
250187

251-
This section explains how you integrate Travis CI Enterprise in your backup strategy. Here, we'll talk about two topics:
188+
This section explains how you integrate Travis CI Enterprise into your backup strategy. Here, we'll talk about two topics:
252189

253190
- [The encryption key](#encryption-key)
254191
- [The data directories](#create-a-backup-of-the-data-directories)
255192

256193
### Encryption key
257194

258-
Without the encryption key you cannot access the information in your production database. To make sure that you can always recover your database, make a backup of this key.
195+
Without the encryption key, you cannot access the information in your production database. To ensure you can always recover your database, make a backup of this key.
259196

260-
> Without the encryption key the information in the database is not recoverable.
197+
> Without the encryption key, the information in the database is not recoverable.
261198
262199
{{ site.data.snippets.enterprise_3_encryption_key_backup }}
263200

264201
{{ site.data.snippets.enterprise_2_encryption_key_backup }}
265202

266203
### Create a backup of the data directories
267204

268-
#### Data backup in TCIE 3.x
269-
270-
Unless you are running self-hosted instances of PostgreSQL, RabbitMQ and Redis, the respective data is held in pods hosting these services.
205+
Unless you run self-hosted PostgreSQL, RabbitMQ, and Redis instances, the respective data is held in pods hosting these services.
271206

272207
In order to back up the Postgres database, you need the database credentials and connection string. On the TCIE 3.x Platform pod, please run:
273208

@@ -308,64 +243,39 @@ kubectl cp [travis-api-pod]:/[location of [Logs DB].sql] [local_file]
308243

309244
> In case you would like to run pg_dump straight from the DB pod: Database pods in TCIE 3.x cluster in non-HA deployment should be named `travisci-platform-platform-postgresql-0` and `travisci-platform-logs-postgresql-0`
310245
311-
Also, you need to connect to the **Redis** and **RabbitMQ** pods, perform data dumps and copy them out of the cluster in a similar way, using tools available for these services. See the respective parts of [Redis documentation](https://redis.io/documentation) and [RabbitMQ Backup & Restore guide](https://www.rabbitmq.com/backup.html) for exact instructions on how to snapshot/backup current state of data.
312-
313-
314-
#### Data backup in TCIE 2.x
315-
The data directories are located on the platform machine and are mounted into the Travis CI container. In these directories you'll find files from RabbitMQ, Postgres, Slanger, Redis, and also log files from the various applications inside the container.
246+
Also, you need to connect to the **Redis** and **RabbitMQ** pods, perform data dumps, and copy them out of the cluster in a similar way, using tools available for these services. See the respective parts of [Redis documentation](https://redis.io/documentation) and [RabbitMQ Backup & Restore guide](https://www.rabbitmq.com/backup.html) for exact instructions on how to snapshot/backup the current state of data.
316247

317-
The files are located at `/var/travis` on the platform machine. Please run `sudo tar -czvf travis-enterprise-data-backup.tar.gz /var/travis` to create a compressed archive from this folder. After this has finished, copy this file off the machine to a secure location.
318248

319249
## Migrate from GitHub Services to Webhooks
320250

321-
Travis CI Enterprise initially used GitHub Services to connect your repositories with GitHub.com (or GitHub Enterprise). As of January 31st, 2019 [services have been disabled on github.com](https://developer.github.com/changes/2019-01-29-life-after-github-services/). Services will also be disabled on GitHub Enterprise starting with GitHub Enterprise v2.17.0.
251+
Travis CI Enterprise initially used GitHub Services to connect your repositories with GitHub.com (or GitHub Enterprise). As of January 31st, 2019, [services have been disabled on github.com](https://developer.github.com/changes/2019-01-29-life-after-github-services/). Services will also be disabled on GitHub Enterprise starting with GitHub Enterprise v2.17.0.
322252

323253
Starting with [Travis CI Enterprise v2.2.5](https://enterprise-changelog.travis-ci.com/release-2-2-5-77988), all repositories that are activated use [webhooks](https://developer.github.com/webhooks/) to connect and manage communication with GitHub.com/GitHub Enterprise.
324254

325-
> Repositories that were activated prior to Travis CI Enterprise v2.2.5 may need to be updated.
255+
> Repositories activated before Travis CI Enterprise v2.2.5 may need to be updated.
326256
327-
Starting with Travis CI Enterprise v2.2.8, a migration tool to automatically update repositories is available. The migration tool will update repositories that are using the deprecated GitHub services instead of webhooks.
257+
Starting with Travis CI Enterprise v2.2.8, a migration tool to automatically update repositories is available. The migration tool will update repositories using the deprecated GitHub services instead of webhooks.
328258

329259
To perform an automatic migration, please follow these steps:
330260

331-
1. **TCIE 2.x only**: Open an SSH connection to the platform machine.
332-
2. Run the following command:
333-
334-
**TCIE 3.x**:
335-
336261
```bash
337262
kubectl exec -it [travis-api-pod] bash
338263
root@[travis-api-pod]:/# bundle exec /app/bin/migrate_hooks <optional-year>
339264
```
340265

341-
**TCIE 2.x**:
342-
```
343-
travis bash -c ". /etc/profile; cd /usr/local/travis-api && ENV=production bundle exec ./bin/migrate-hooks <optional-year>"
344-
```
345-
266+
This will search for all active repositories still using GitHub Services and migrate them to webhooks instead.
346267

347-
This will search for all active repositories that are still using GitHub Services and migrate them to use webhooks instead.
348-
349-
You can provide a year argument (e.g. `2017`) in the above command to only migrate repositories activated on Travis CI Enterprise during that year.
268+
You can provide a year argument (e.g., `2017`) in the above command to only migrate repositories activated on Travis CI Enterprise during that year.
350269

351270
If you have a large number of repositories activated on your Travis CI Enterprise installation, please run the migration several times, breaking it down per year. For example:
352271

353-
**TCIE 3.x**:
354-
355272
```bash
356273
kubectl exec -it [travis-api-pod] bash
357274
root@[travis-api-pod]:/# bundle exec /app/bin/migrate_hooks 2019
358275
root@[travis-api-pod]:/# bundle exec /app/bin/migrate_hooks 2018
359276
root@[travis-api-pod]:/# bundle exec /app/bin/migrate_hooks 2017
360277
```
361278

362-
**TCIE 2.x**:
363-
```
364-
travis bash -c ". /etc/profile; cd /usr/local/travis-api && ENV=production bundle exec ./bin/migrate-hooks 2019"
365-
travis bash -c ". /etc/profile; cd /usr/local/travis-api && ENV=production bundle exec ./bin/migrate-hooks 2018"
366-
travis bash -c ". /etc/profile; cd /usr/local/travis-api && ENV=production bundle exec ./bin/migrate-hooks 2017"
367-
```
368-
369279
You should not experience any behavior change with your repositories after the migration is complete.
370280

371281
## Contact Enterprise Support

0 commit comments

Comments
 (0)