18F / archived-guides

A collection of 18F guides.
https://guides.18f.gov
Other
20 stars 12 forks source link

Change guides.18f.gov to the guides directory #51

Closed wslack closed 7 years ago

wslack commented 7 years ago

Steps:

  1. ~Better understand how the current CDN route is configured~. (done, answer is "" for path)
  2. ~Guides is building on GovCloud~ (done)
  3. Update route pages.18f.gov to exclude guides.18f.gov: cf update-service pages.18f.gov -c '{"domain": "pages.18f.gov", "origin": "federalist-redirect.app.cloud.gov", "path": ""}'
  4. Merge https://github.com/18F/pages-redirects/pull/69
  5. Delete current guides CNAME from https://github.com/18F/dns/blob/deploy/terraform/18f.gov.tf
  6. After the domain is freed, run a command to make a new route: cf create-service cdn-route cdn-route guides.18f.gov-route -c '{"domain": "guides.18f.gov", "origin": "federalist-proxy.app.cloud.gov", "path": "/site/18f/guides"}'
  7. Retrieve cloudfront URL
  8. Add entry in https://github.com/18F/dns/blob/deploy/terraform/18f.gov.tf
resource "aws_route53_record" "18f_gov_guides_18f_gov_a" {
  zone_id = "${aws_route53_zone.18f_gov_zone.zone_id}"
  name = "guides.18f.gov."
  type = "A"
  alias {
    name = "CDN-Broker-makes-this.cloudfront.net."
    zone_id = "Z2FDTNDATAQYW2"
    evaluate_target_health = false
  }
}

Revert plan:

wslack commented 7 years ago

Need to confirm this looks right.

LinuxBozo commented 7 years ago

@wslack The current path for pages.18f.gov CDN service instance is the default: ""

wslack commented 7 years ago

updated! @ccostino once you verify this looks ok we can execute.

ccostino commented 7 years ago

I think this is okay and should be good to go. Nice to see the revert plan just in case, too. :-) Thanks, @wslack!

wslack commented 7 years ago

Just realized my PR to the pages-redirects app needs a review first!

ccostino commented 7 years ago

That's the https://github.com/18F/pages-redirects/pull/69 PR, right @wslack?

jmhooper commented 7 years ago

I gave this a 👀 as well. :+1: from me!

wslack commented 7 years ago

Sorry all, one more thing I don't understand. When I run cf service pages.18f.gov in the redirects space, I see Service instance provisioned [pages.18f.gov,guides.18f.gov => federalist-redirect.app.cloud.gov]

But pages.18f.gov is linked to pages-redirects already....so is the mapping in the space overriding the CDN setting?

jmhooper commented 7 years ago

I'd think it would be the opposite. I'd think whatever is configured in the DNS repo will take precedence, and right now the DNS repo points both pages.18f.gov and guides.18f.gov to the same CloudFront instance. I'd imagine that's this pages.18f.gov service.

wslack commented 7 years ago

So the DNS repo is pointed to this CloudFrong route, and this cloudfront route is pointed at federalist-redirect.app.cloud.gov......so what is pointed at pages-redirects.app.cloud.gov?

wslack commented 7 years ago

I think the routes are bound in a way that overrides the config. I don't think my command will impact that, but I'm not 100% sure.

wslack commented 7 years ago

New command cf update-service pages.18f.gov -c '{"domain": "pages.18f.gov", "origin": "pages-redirects.app.cloud.gov", "path": ""}'

wslack commented 7 years ago

Completed through step 5 right now, waiting for domain to be available for step 6.

wslack commented 7 years ago

Got domain, just filed new DNS record

wslack commented 7 years ago

This is done! We forgot to update the menu links, which https://github.com/18F/guides/pull/52 took care of.