|
| 1 | +<!--pytest-codeblocks:skipfile--> |
| 2 | + |
| 3 | +# Catalog Installation |
| 4 | + |
| 5 | +Quilt is a data mesh that verifies the integrity of your data so that teams can |
| 6 | +find, understand, and file discoveries based on data of any size or in any format. |
| 7 | + |
| 8 | +A Quilt _instance_ is a private portal that runs in your virtual private cloud (VPC). |
| 9 | + |
| 10 | +Quilt supports multiple deployment methods including CloudFormation, |
| 11 | +AWS Marketplace, and Terraform. |
| 12 | + |
| 13 | +## Help and Advice |
| 14 | + |
| 15 | +We encourage users to contact us before deploying Quilt. |
| 16 | +We will make sure that you have the latest version of Quilt, |
| 17 | +and walk you through the CloudFormation deployment. |
| 18 | + |
| 19 | +We recommend that all users do one or more of the following: |
| 20 | + |
| 21 | +* [Schedule a Quilt engineer](https://calendly.com/d/g6f-vnd-qf3/engineering-team) |
| 22 | +to guide you through the installation |
| 23 | + |
| 24 | +* [Join Quilt on Slack](https://slack.quiltdata.com/) to ask questions and |
| 25 | +connect with other users |
| 26 | + |
| 27 | +* [Email Quilt ](mailto:[email protected]) |
| 28 | + |
| 29 | +## Requirements and Prerequisites |
| 30 | + |
| 31 | +### Knowledge Requirements |
| 32 | + |
| 33 | +Running Quilt requires working knowledge of [AWS CloudFormation](https://aws.amazon.com/cloudformation/), |
| 34 | +[AWS S3](https://aws.amazon.com/s3/) and [Elasticsearch Service](https://aws.amazon.com/elasticsearch-service/). |
| 35 | + |
| 36 | +### Before you install Quilt |
| 37 | + |
| 38 | +You will need the following: |
| 39 | + |
| 40 | +1. **An AWS account**. |
| 41 | + 1. **The service-linked role for Elasticsearch** |
| 42 | + > This role is not created automatically when you use Cloudformation or other |
| 43 | + > APIs. |
| 44 | +
|
| 45 | + You can create the role as follows: |
| 46 | + |
| 47 | + ```bash |
| 48 | + aws iam create-service-linked-role --aws-service-name es.amazonaws.com |
| 49 | + ``` |
| 50 | + |
| 51 | +1. **IAM Permissions** to create the CloudFormation stack (or Add products in |
| 52 | +Service Catalog). |
| 53 | + 1. You may choose to use a |
| 54 | + [CloudFormation service role](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html) |
| 55 | + for stack creation and updates. |
| 56 | + 1. Refer to this [example service role](../cfn-service-role.yaml) |
| 57 | + and modify as needed to fit your use case. |
| 58 | + |
| 59 | + > Ensure that your service role is up-to-date with the example before every stack |
| 60 | + update so as to prevent installation failures. |
| 61 | + |
| 62 | +1. The **ability to create DNS entries**, such as CNAME records, |
| 63 | +for your company's domain. |
| 64 | +1. **An SSL certificate in the same region as your Quilt instance** to secure the |
| 65 | +domain where your users will access your Quilt instance. |
| 66 | + 1. For example, to make your Quilt catalog available at `https://quilt.mycompany.com`, |
| 67 | + you require a certificate for either `*.mycompany.com` _or_ for the following |
| 68 | + 3 domains: `quilt.mycompany.com`, `quilt-registry.mycompany.com` and `quilt-s3-proxy.mycompany.com` |
| 69 | + in the [AWS Certificate Manager](https://aws.amazon.com/certificate-manager/). |
| 70 | + 1. You may either [create a new certificate](https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html), |
| 71 | + or [import an existing certificate](https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html). |
| 72 | + 1. The ARN for this certificate or set of certificates is required for use |
| 73 | + as the `CertificateArnELB` CloudFormation parameter. |
| 74 | +1. For maximum security, Quilt requires **a region that supports |
| 75 | +[AWS |
| 76 | +Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate-Regions.html#linux-regions)**. |
| 77 | +As of this writing, all U.S. regions support Fargate. |
| 78 | +1. **An S3 Bucket** for your team data. This may be a new or existing |
| 79 | +bucket. The bucket should not have any notifications attached to |
| 80 | +it (`S3 Console > Bucket > Properties > Events`). Quilt will need |
| 81 | +to install its own notifications. Installing Quilt will modify the |
| 82 | +following Bucket characteristics: |
| 83 | + 1. Properties > Object-level logging (will be enabled). |
| 84 | + 1. Properties > Events (will add one notification). |
| 85 | +
|
| 86 | + > Buckets in Quilt may choose to enable versioning or disable versioning. |
| 87 | + **It is strongly recommended that you keep versioning either on or off during |
| 88 | + the entire lifetime of the bucket**. Toggling versioning on and off incurs |
| 89 | + edge cases that may cause bugs with any state that Quilt stores in |
| 90 | + ElasticSearch due to inconsistent semantics of `ObjectRemoved:DeleteMarkerCreated`. |
| 91 | +
|
| 92 | +1. Available **CloudTrail Trails** in the region where you wish to host your stack |
| 93 | +([learn more](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html)). |
| 94 | +1. A license key or an active subscription to Quilt Business on AWS Marketplace. |
| 95 | + 1. Click `Continue to Subscribe` on the [Quilt Business Listing](https://aws.amazon.com/marketplace/pp/B07QF1VXFQ) |
| 96 | + to subscribe then return to this page for installation instructions. |
| 97 | + 1. **The CloudFormation template and instructions on AWS Marketplace are |
| 98 | + infrequently updated and may be missing critical bugfixes.** |
| 99 | +
|
| 100 | +## Installation Methods |
| 101 | +
|
| 102 | +### AWS Marketplace |
| 103 | +
|
| 104 | +You can install Quilt via AWS Marketplace. As indicated above, we |
| 105 | +recommend that you [contact us first](#help-and-advice). |
| 106 | +
|
| 107 | +### AWS Service Catalog |
| 108 | +
|
| 109 | + |
| 110 | +with your AWS account ID to request access to Quilt through the |
| 111 | +AWS Service Catalog and to obtain a license key. |
| 112 | +1. Click the service catalog link that you received from Quilt. |
| 113 | +Arrive at the Service Catalog. Click IMPORT, lower right. |
| 114 | +
|
| 115 | +  |
| 116 | +
|
| 117 | +1. Navigate to Admin > Portfolios list > Imported Portfolios. Click Quilt Enterprise. |
| 118 | +
|
| 119 | +  |
| 120 | +
|
| 121 | +1. On the Portfolio details page, click ADD USER, GROUP OR ROLE. Add any users, |
| 122 | +**including yourself**, whom you would like to be able to install Quilt. |
| 123 | +
|
| 124 | +  |
| 125 | +
|
| 126 | +1. Click Products list, upper left. Click the menu to the left of Quilt CloudFormation |
| 127 | +Template. Click Launch product. (In the future, use the same menu to upgrade |
| 128 | +Quilt when a new version is released.) |
| 129 | +
|
| 130 | +  |
| 131 | +
|
| 132 | +1. Continue to the [CloudFormation](#cloudformation) section. |
| 133 | +Note: the following screenshots may differ slightly from what |
| 134 | +you see in Service Catalog. |
| 135 | +
|
| 136 | +### CloudFormation |
| 137 | +
|
| 138 | +You can perform stack update and creation with the AWS Console, AWS CLI, |
| 139 | +Terraform, or other means. |
| 140 | +
|
| 141 | +In all cases it is **highly recommended** that you set the `--on-failure` policy |
| 142 | +to `ROLLBACK` so as to avoid incomplete rollback and problematic stack states. |
| 143 | +In the AWS Console this option appears under the phrase "Stack failure options." |
| 144 | +
|
| 145 | +1. Specify stack details in the form of a stack _name_ and CloudFormation |
| 146 | +_parameters_. Refer to the descriptions displayed above each |
| 147 | +text box for further details. Service Catalog users require a license key. See |
| 148 | +[Before you install Quilt](#before-you-install-quilt) for how to obtain |
| 149 | +a license key. |
| 150 | +
|
| 151 | +  |
| 152 | +
|
| 153 | +1. If you wish to use a service role, specify it as follows: |
| 154 | +
|
| 155 | +  |
| 156 | +
|
| 157 | +1. Service Catalog users, skip this step. Under Stack creation |
| 158 | +options, enable termination protection. This protects the stack |
| 159 | +from accidental deletion. Click Next. |
| 160 | +
|
| 161 | +  |
| 162 | +
|
| 163 | +1. Service Catalog users, skip this step. Check the box asking you |
| 164 | +to acknowledge that CloudFormation may create IAM roles, then click |
| 165 | +Create. |
| 166 | +
|
| 167 | +  |
| 168 | +
|
| 169 | +1. CloudFormation may take between 30 and 90 minutes to create your stack. |
| 170 | +You can monitor progress under Events. On completion you will see `CREATE_COMPLETE`. |
| 171 | +
|
| 172 | +  |
| 173 | +
|
| 174 | +1. To finish the installation, you will want to view the stack Outputs. |
| 175 | +
|
| 176 | +  |
| 177 | +
|
| 178 | +### Terraform |
| 179 | +
|
| 180 | +You can also install Quilt using [Terraform](https://developer.hashicorp.com/terraform), |
| 181 | +which enables more granular infrastructure-as-code control. |
| 182 | +
|
| 183 | +Terraform users **must** request a compatible CloudFormation template from Quilt: |
| 184 | +
|
| 185 | +> Contact your account manager to obtain a template that works with Terraform and |
| 186 | +includes necessary variables. |
| 187 | +
|
| 188 | +1. Set up your project directory as follows: |
| 189 | +
|
| 190 | + ```bash |
| 191 | + quilt_stack/ |
| 192 | + ├── main.tf |
| 193 | + └── my-company.yml |
| 194 | + ``` |
| 195 | +
|
| 196 | + Use [examples/main.tf](https://github.com/quiltdata/iac/blob/main/examples/main.tf) |
| 197 | + as a template. |
| 198 | +
|
| 199 | +2. Define your AWS profile: |
| 200 | +
|
| 201 | + ```bash |
| 202 | + export AWS_PROFILE=your-profile-name |
| 203 | + ``` |
| 204 | +
|
| 205 | +3. Initialize Terraform: |
| 206 | +
|
| 207 | + ```bash |
| 208 | + terraform init |
| 209 | + ``` |
| 210 | +
|
| 211 | +4. Plan and apply: |
| 212 | +
|
| 213 | + ```bash |
| 214 | + terraform plan -out=tfplan |
| 215 | + terraform apply tfplan |
| 216 | + ``` |
| 217 | +
|
| 218 | +5. Use `terraform output` to obtain values such as the admin password or |
| 219 | +endpoint URLs. |
| 220 | +
|
| 221 | +**Note:** We recommend using [remote state](https://developer.hashicorp.com/terraform/language/state/remote) |
| 222 | +and not storing passwords in version control. |
| 223 | +
|
| 224 | +> For detailed configuration options, including search sizing and common pitfalls, |
| 225 | +see the [Terraform README](https://github.com/quiltdata/iac/blob/main/README.md). |
| 226 | +
|
| 227 | +### CNAMEs |
| 228 | +
|
| 229 | +In order for your users to reach the Quilt catalog you must set three CNAMEs |
| 230 | +that point to the `LoadBalancerDNSName` as shown below and in the Outputs |
| 231 | +of your stack. |
| 232 | +
|
| 233 | +| CNAME | Value | |
| 234 | +| ------ | ------- | |
| 235 | +| `<QuiltWebHost>` Key | `LoadBalancerDNSName` | |
| 236 | +| `<RegistryHostName>` Key | `LoadBalancerDNSName` | |
| 237 | +| `<S3ProxyHost>` Key | `LoadBalancerDNSName` | |
| 238 | +
|
| 239 | +Quilt is now up and running. You can click on the _QuiltWebHost_ value |
| 240 | +in Outputs and log in with your administrator password to invite users. |
| 241 | +
|
| 242 | +## Routine Maintenance and Upgrades |
| 243 | +
|
| 244 | +Releases are sent to customers over email. We recommend that you apply new releases |
| 245 | +as soon as possible to benefit from the latest security updates and features. |
| 246 | +
|
| 247 | +### CloudFormation updates |
| 248 | +
|
| 249 | +To update your Quilt stack, apply the latest CloudFormation template in the |
| 250 | +CloudFormation console as follows. |
| 251 | +
|
| 252 | +> By default, previous parameter values carry over. |
| 253 | +
|
| 254 | +1. Navigate to AWS Console > CloudFormation > Stacks |
| 255 | +1. Select your Quilt stack |
| 256 | +1. Click Update (upper right) |
| 257 | +1. Choose Replace current template |
| 258 | +1. Enter the Amazon S3 URL for your template |
| 259 | +1. Click Next (several times) and proceed to apply the update |
| 260 | +
|
| 261 | +### Terraform updates |
| 262 | +
|
| 263 | +> See above. |
| 264 | +
|
| 265 | +## Upgrading from network 1.0 to network 2.0 |
| 266 | +
|
| 267 | +Upgrading to the Quilt 2.0 network configuration provides improved security by means |
| 268 | +of isolated subnets and a preference for private routing. |
| 269 | +
|
| 270 | +An upgrade to the 2.0 network, unlike routine Quilt upgrades, requires you to create |
| 271 | +a new stack with a new load balancer. You must therefore also update your |
| 272 | +[CNAMEs](#cnames) to point to the new load balancer. |
| 273 | +
|
| 274 | +## Create a new stack with an existing configuration |
| 275 | +
|
| 276 | +Terraform users can create a new Quilt stack with the same configuration as an existing |
| 277 | +stack. This is typically useful when upgrading to the 2.0 network. |
| 278 | +
|
| 279 | +> _Configuration_ refers to the Quilt stack buckets, roles, policies, |
| 280 | +> and other administrative settings, all of which are stored in RDS. |
| 281 | +
|
| 282 | +Perform the following steps: |
| 283 | +
|
| 284 | +1. Contact your Quilt account manager for a template that supports Terraform. |
| 285 | +
|
| 286 | +1. Take a manual snapshot of the current Quilt database instance. For an existing |
| 287 | +Quilt stack this resource has the logical ID "DB". Note the snapshot identifier |
| 288 | +("Snapshot name" in the AWS Console, `DBSnapshotIdentifier` in the following |
| 289 | +AWS CLI command): |
| 290 | +
|
| 291 | + <!--pytest.mark.skip--> |
| 292 | + ```sh |
| 293 | + aws rds describe-db-snapshots |
| 294 | + ``` |
| 295 | +
|
| 296 | + > Be sure to take a _manual_ snapshot. Do not rely on automatic snapshots, |
| 297 | + > which are deleted when the parent stack is deleted. |
| 298 | +
|
| 299 | +1. Apply the [quilt Terraform module](https://github.com/quiltdata/iac) |
| 300 | +to your new template and provide the snapshot identifier to the |
| 301 | +`db_snapshot_identifier=` argument. |
| 302 | +
|
| 303 | + > You must use a Quilt CloudFormation template that supports an existing database, |
| 304 | + > existing search domain, and existing vpc in order for the terraform modules |
| 305 | + > to function properly. |
| 306 | +
|
| 307 | +1. You now have a new Quilt stack with a configuration equivalent to your prior stack. |
| 308 | +Verify that the new stack is working as desired. Delete the old stack. |
0 commit comments