Skip to content

Commit c6bedb1

Browse files
authored
Document Migration Procedure from CircleCI Server 1.0 to 2.0 (circleci#1530)
* Document migration procedure * editorial updates to upgrading.md * add upgrading.md to sidebar navigation * fix link * Change improt method remove some extra info that is not necessary * Add instructions for updating S3 and IAM policy. * minor edits * Some tweaks
1 parent c029227 commit c6bedb1

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed

jekyll/_cci2/upgrading.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
layout: classic-docs
3+
title: "Upgrading from CircleCI 1.0 Enterprise Installation to 2.0"
4+
category: [administration]
5+
order: 11
6+
description: "How to upgrade from CircleCI 1.0 Enterprise to CircleCI 2.0"
7+
---
8+
9+
This document provides instructions for System Administrators upgrading an existing CircleCI 1.0 Enterprise installation to CircleCI 2.0 in the following sections:
10+
11+
* TOC
12+
{:toc}
13+
14+
**Notes:**
15+
- CircleCI 2.0 is only installable on AWS at this time.
16+
- There is not currently an in-place upgrade mechanism. The upgrade process will require you to set up a new installation of CircleCI and import the existing data. This will require a downtime window.
17+
18+
## Perform Installation of CircleCI 2.0
19+
20+
After you have exported your databases, install CircleCI 2.0 using Terraform as described in the [Installing CircleCI 2.0 on Amazon Web Services with Terraform]({{ site.baseurl }}/2.0/aws/) document.
21+
22+
To test your new install, set up a new GitHub application and use a different hostname. After you have verified that the new installation works, you can cut over from your previous GitHub OAuth Application and subdomain name.
23+
24+
## Verify Your New Installation
25+
26+
Verify that your installation works by forking and running our [Reality Check](https://github.com/circleci/realitycheck) repository which exercises the basic functionality of CircleCI 2.0.
27+
28+
## Perform a Backup
29+
30+
Prior to beginning the upgrade procedure, you should back up all of your data in the 1.0 installation as described in the [backup documentation]({{ site.baseurl }}/2.0/backup/).
31+
32+
## Export Existing Databases
33+
34+
CircleCI 2.0 runs MongoDB 3.2.11 and PostgreSQL 9.5. These are major upgrade versions compared to CircleCI 1.0 Enterprise. The upgrade process consists of the following steps:
35+
36+
1. Convert the data to be compatible with the updated versions of the database servers and export into a tarball.
37+
2. Transfer the tarball to your new CircleCI 2.0 installation.
38+
3. Import upgraded databases into the new installation.
39+
40+
This procedure uses `bash` scripts to perform all of the above steps and then it runs some basic sanity checks. The following steps should be performed on the existing CircleCI 1.0 Enterprise installation.
41+
42+
**Note:** The following steps are non-destructive and in the event of any failure in the upgrade process you will be able to revert back to the previous state. As with all major software changes, you should still create a backup just to be safe.
43+
44+
1. Log in to the Replicated console located at `https://<your-circleci-install>:8800/dashboard` and select Stop Now to shutdown CircleCI.
45+
2. SSH in to the Services machine and switch to the `root` user with the `sudo su` command.
46+
3. Confirm that the MongoDB and PostgreSQL containers have stopped by listing all running containers with the `docker ps` command.
47+
4. Download and run the upgrade script using the commands below. The duration of the upgrade operation depends on the amount of stored data.
48+
49+
```
50+
wget https://s3.amazonaws.com/release-team/scripts/circleci-database-upgrade
51+
chmod +x circleci-database-upgrade
52+
./circleci-database-upgrade
53+
```
54+
55+
5. After the upgrade process is complete, a `.tar.gz` file appears in the directory where you ran the script. You will use this file to import your data into your new CircleCI 2.0 installation in a subsequent step.
56+
57+
## Import Data
58+
59+
1. Copy the database export created in the first section to the new CircleCI 2.0 Services instance.
60+
2. Remove the existing databases that were created during testing with `rm -rf /data/circle/postgres` and `rm -rf /data/circle/mongo`.
61+
3. Download and run the import script using the commands below. The duration of the import operation depends on the amount of stored data.
62+
63+
```
64+
wget https://s3.amazonaws.com/release-team/scripts/circleci-database-import
65+
chmod +x circleci-database-import
66+
./circleci-database-import $TAR_FILE
67+
```
68+
69+
## Cut Over
70+
71+
Complete the following steps to cut over to the new installation:
72+
73+
1. Update S3 settings. In AWS, edit the in-line policy in the IAM role named "$prefix_role" created for your 2.0 installation.
74+
75+
2. Update Replicated settings. In the Replicated management console, update the name of the S3 bucket to match the name that you used in your 1.0 installation, and populate the rest of the settings to match your original GitHub OAuth application.
76+
77+
3. Start the app and verify that all of your previous builds and project settings are available.
78+
79+
4. You can now update DNS settings to have your original hostname point to the new installation.
80+
81+
## Troubleshooting
82+
83+
If you run into any issues with the upgrade process contact [CircleCI support](mailto:[email protected]) for assistance.
84+

jekyll/_includes/sidebar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
<li><a href="{{ site.baseurl }}/2.0/overview/">Administrator's Overview</a></li>
5959
<li><a href="{{ site.baseurl }}/2.0/single-box/">CircleCI 2.0 Trial Installation</a></li>
6060
<li><a href="{{ site.baseurl }}/2.0/admin-faq/">Administration FAQ</a></li>
61+
<li><a href="{{ site.baseurl }}/2.0/upgrading/">Upgrading from CircleCI 1.0 Enterprise Installation to 2.0</a></li>
6162
<li><a href="{{ site.baseurl }}/2.0/security/">Security Features</a></li>
6263
<li><a href="{{ site.baseurl }}/2.0/aws/">Installing CircleCI 2.0 on Amazon Web Services with Terraform</a></li>
6364
<li><a href="{{ site.baseurl }}/2.0/high-availability/">Configuring High Availability</a></li>

0 commit comments

Comments
 (0)