From 40c2a2d637bb9bf33d07e374fc144441a7ce7e65 Mon Sep 17 00:00:00 2001 From: Ana Krivokapic Date: Wed, 11 Aug 2021 16:13:53 +0200 Subject: [PATCH 01/16] [WIP] Add patcher use cases page --- ...er-landing-page-tabs-terraform-upgrade.yml | 7 + pages/landing/patcher-use-cases/_hero.html | 27 +++ .../patcher-use-cases/_social-proof.html | 18 ++ .../landing/patcher-use-cases/_sub-hero.html | 9 + .../landing/patcher-use-cases/_use-cases.html | 200 ++++++++++++++++++ pages/landing/patcher-use-cases/index.html | 87 ++++++++ 6 files changed, 348 insertions(+) create mode 100644 _data/patcher-landing-page-tabs-terraform-upgrade.yml create mode 100644 pages/landing/patcher-use-cases/_hero.html create mode 100644 pages/landing/patcher-use-cases/_social-proof.html create mode 100644 pages/landing/patcher-use-cases/_sub-hero.html create mode 100644 pages/landing/patcher-use-cases/_use-cases.html create mode 100644 pages/landing/patcher-use-cases/index.html diff --git a/_data/patcher-landing-page-tabs-terraform-upgrade.yml b/_data/patcher-landing-page-tabs-terraform-upgrade.yml new file mode 100644 index 000000000..d497287b9 --- /dev/null +++ b/_data/patcher-landing-page-tabs-terraform-upgrade.yml @@ -0,0 +1,7 @@ +- id: pr + title: PR + content: https://i.imgur.com/XDAl1Ew.png + +- id: patch + title: Patch + content: https://i.imgur.com/mxEkeHw.png diff --git a/pages/landing/patcher-use-cases/_hero.html b/pages/landing/patcher-use-cases/_hero.html new file mode 100644 index 000000000..a923d40bf --- /dev/null +++ b/pages/landing/patcher-use-cases/_hero.html @@ -0,0 +1,27 @@ + +
+

+ {{ page.title }} +

+
+ {{ page.excerpt }} +
+
+

+ {{ page.hero.cta }} +

+
+
diff --git a/pages/landing/patcher-use-cases/_social-proof.html b/pages/landing/patcher-use-cases/_social-proof.html new file mode 100644 index 000000000..69daf2a47 --- /dev/null +++ b/pages/landing/patcher-use-cases/_social-proof.html @@ -0,0 +1,18 @@ +
+

Meet the Gruntwork community.

+
+
+
+ {% for customer in site.data.customers limit:12 %} +
+
+ {{ customer.name }} +
+
+ {% endfor %} +
+
diff --git a/pages/landing/patcher-use-cases/_sub-hero.html b/pages/landing/patcher-use-cases/_sub-hero.html new file mode 100644 index 000000000..f1de95fe4 --- /dev/null +++ b/pages/landing/patcher-use-cases/_sub-hero.html @@ -0,0 +1,9 @@ +
+
+ {% for logo in page.hero.logos %} +
+ +
+ {% endfor %} +
+
diff --git a/pages/landing/patcher-use-cases/_use-cases.html b/pages/landing/patcher-use-cases/_use-cases.html new file mode 100644 index 000000000..2891ac84e --- /dev/null +++ b/pages/landing/patcher-use-cases/_use-cases.html @@ -0,0 +1,200 @@ +{% for item in page.use_cases %} +
+ {% if item.precode %} +
+ {{ item.precode }} +
+ {% endif %} + {% if item.tab_block %} +
+
+ {% for tab in site.data.patcher-landing-page-tabs-terraform-upgrade %} +
+ +
+ {% endfor %} +
+
+ {% for tab in site.data.patcher-landing-page-tabs-terraform-upgrade %} +
+ +
+ {% endfor %} +
+
+ {% endif %} + {% if item.tab_code_preview %} +
+
+ {% for tab in site.data.heroku-landing-page-tabs-code %} +
+ +
+ {% endfor %} +
+
+ {% for tab in site.data.heroku-landing-page-tabs-code %} +
+ {{ tab.content }} +
+ {% endfor %} +
+
+ {% endif %} + {% if item.image %} +
+ +
+ {% endif %} +
+

{{ item.heading }}

+

{{ item.body }}

+
+ {% for logo in item.logos %} +
+
+ {{ logo.title }} +
+ {{ logo.title }} +
+ {% endfor %} +
+
+
+{% endfor %} + + + + diff --git a/pages/landing/patcher-use-cases/index.html b/pages/landing/patcher-use-cases/index.html new file mode 100644 index 000000000..e0ec94908 --- /dev/null +++ b/pages/landing/patcher-use-cases/index.html @@ -0,0 +1,87 @@ +--- +layout: landing +type: landing +slug: index-page + +title: Patcher Use Cases +excerpt: Some examples of scenarios where Patcher can be useful +permalink: /patcher-use-cases/ +custom_js: +- prism +prism_css: /assets/css/prism-landing-zone.css + +hero: + image: /assets/img/infrastructure-cube-icons/infrastructure-in-a-day.png + cta: Request early access! + logos: + - /assets/img/logos-technologies/partner_logo_aws.png + - /assets/img/logos-technologies/partner_logo_kubernetes.png + - /assets/img/logos-technologies/partner_logo_terraform.png + +use_cases: + - heading: "Use case 1: Update to Terraform 1.0 automatically" + tab_block: site.data.patcher-landing-page-tabs-terraform-upgrade + body: | + You can use Patcher to automatically update a codebase containing Terraform modules to a new Terraform version, including new major versions that contain backwards incompatible changes. Patcher will help you update your codebase all the way from Terrafrom 0.11 to Terraform 1.0, and it supports incremental upgrades (e.g., 0.11 -> 0.12 -> 0.13 -> 0.14 -> 0.15 -> 1.0). Patcher will scan your codebase and open a pull request, such as the one shown in the screenshot below, that transforms your code to use the new version of Terraform. For example, Terraform 0.12 had a particularly painful backwards incompatible upgrade, but Patcher can make such upgrades as painless and smooth as reviewing and merging a PR. + At Gruntwork, we have created patches to automatically do each of the incremental upgrades. E.g. the patch that preforms the upgrade from 0.13 to 0.14 supports making these changes to the codebase: update `required_version` constraint in code; replace version constraints in `provider` blocks with `required_providers` configuration; update all the versions in `source` URLs to use the versions of Gruntwork modules that work with TF 0.14; update CI / CD config to use TF 0.14; update Terratest version to the version that supports TF 0.14; run `terraform fmt`; run `terraform validate`. + + - heading: "Use case 2: Update to React X.Y.Z automatically" + image: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0xMS41IC0xMC4yMzE3NCAyMyAyMC40NjM0OCI+CiAgPHRpdGxlPlJlYWN0IExvZ288L3RpdGxlPgogIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIyLjA1IiBmaWxsPSIjNjFkYWZiIi8+CiAgPGcgc3Ryb2tlPSIjNjFkYWZiIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIi8+CiAgICA8ZWxsaXBzZSByeD0iMTEiIHJ5PSI0LjIiIHRyYW5zZm9ybT0icm90YXRlKDYwKSIvPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIiB0cmFuc2Zvcm09InJvdGF0ZSgxMjApIi8+CiAgPC9nPgo8L3N2Zz4K + image_side: left + image_width: 379px + body: | + TBD + + - heading: "Use case 3: Update to Ruby on Rails X.Y.Z automatically" + image: https://rubyonrails.org/images/rails-logo.svg + image_width: 379px + body: | + TBD + + - heading: "Use case 4: Update to a new version of an internal utility" + image: https://upload.wikimedia.org/wikipedia/de/thumb/e/e1/Java-Logo.svg/1200px-Java-Logo.svg.png + image_width: 379px + image_side: left + body: | + TBD + + +footer: + heading: The infrastructure you've always wanted + body: | + + cta: Request early access! +--- + +
+
+
+
+ {% include_relative _hero.html %} +
+
+
+
+
+
+ {% include_relative _sub-hero.html %} +
+
+
+
+
+ {% include_relative _use-cases.html %} +
+
+
+
+
+ {% include_relative _social-proof.html %} +
+
+
+
From 40f521b4ba1e9d16e1c3372a53c37e5f82e8e75b Mon Sep 17 00:00:00 2001 From: Ana Krivokapic Date: Thu, 12 Aug 2021 14:24:21 +0200 Subject: [PATCH 02/16] Add remaining use cases --- pages/landing/patcher-use-cases/index.html | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pages/landing/patcher-use-cases/index.html b/pages/landing/patcher-use-cases/index.html index e0ec94908..e93b72ed8 100644 --- a/pages/landing/patcher-use-cases/index.html +++ b/pages/landing/patcher-use-cases/index.html @@ -25,25 +25,28 @@ You can use Patcher to automatically update a codebase containing Terraform modules to a new Terraform version, including new major versions that contain backwards incompatible changes. Patcher will help you update your codebase all the way from Terrafrom 0.11 to Terraform 1.0, and it supports incremental upgrades (e.g., 0.11 -> 0.12 -> 0.13 -> 0.14 -> 0.15 -> 1.0). Patcher will scan your codebase and open a pull request, such as the one shown in the screenshot below, that transforms your code to use the new version of Terraform. For example, Terraform 0.12 had a particularly painful backwards incompatible upgrade, but Patcher can make such upgrades as painless and smooth as reviewing and merging a PR. At Gruntwork, we have created patches to automatically do each of the incremental upgrades. E.g. the patch that preforms the upgrade from 0.13 to 0.14 supports making these changes to the codebase: update `required_version` constraint in code; replace version constraints in `provider` blocks with `required_providers` configuration; update all the versions in `source` URLs to use the versions of Gruntwork modules that work with TF 0.14; update CI / CD config to use TF 0.14; update Terratest version to the version that supports TF 0.14; run `terraform fmt`; run `terraform validate`. - - heading: "Use case 2: Update to React X.Y.Z automatically" + - heading: "Use case 2: Update to React 17.0 automatically" image: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0xMS41IC0xMC4yMzE3NCAyMyAyMC40NjM0OCI+CiAgPHRpdGxlPlJlYWN0IExvZ288L3RpdGxlPgogIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIyLjA1IiBmaWxsPSIjNjFkYWZiIi8+CiAgPGcgc3Ryb2tlPSIjNjFkYWZiIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIi8+CiAgICA8ZWxsaXBzZSByeD0iMTEiIHJ5PSI0LjIiIHRyYW5zZm9ybT0icm90YXRlKDYwKSIvPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIiB0cmFuc2Zvcm09InJvdGF0ZSgxMjApIi8+CiAgPC9nPgo8L3N2Zz4K image_side: left image_width: 379px body: | - TBD + - - heading: "Use case 3: Update to Ruby on Rails X.Y.Z automatically" + - heading: "Use case 3: Update to Ruby on Rails 2.3.16/3.0.20 automatically" image: https://rubyonrails.org/images/rails-logo.svg image_width: 379px body: | - TBD + Use Patcher to patch your code against security vulnerabilities. A few years ago, Ruby on Rails had a serious security vulnerability that allowed remote attackers to execute arbitrary code, conduct SQL injection attacks, or bypass authentication. In addition to updating to the new version, a fix for it required changes to the code. By leveraging Patcher's Patch Files, you can automate critical updates such as these. - heading: "Use case 4: Update to a new version of an internal utility" image: https://upload.wikimedia.org/wikipedia/de/thumb/e/e1/Java-Logo.svg/1200px-Java-Logo.svg.png image_width: 379px image_side: left body: | - TBD + Use Patcher to automate updates of internal dependencies. Let's say an internal team is working on a security.jar library that is used by hundreds of microservices within your company. After a new major version of security.jar has been released, you can use Patcher to conduct updates to other code bases that depend on security.jar. A Patch File in this case would bump the version of security.jar, as well as perform any other necessary code transformations in the code bases that depend on it. footer: From acf7dc112afef421d034cef849c84ef908c87efc Mon Sep 17 00:00:00 2001 From: Ana Krivokapic Date: Thu, 12 Aug 2021 14:34:28 +0200 Subject: [PATCH 03/16] Improve Terraform use case --- pages/landing/patcher-use-cases/_use-cases.html | 5 +++++ pages/landing/patcher-use-cases/index.html | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pages/landing/patcher-use-cases/_use-cases.html b/pages/landing/patcher-use-cases/_use-cases.html index 2891ac84e..17a9c6b7c 100644 --- a/pages/landing/patcher-use-cases/_use-cases.html +++ b/pages/landing/patcher-use-cases/_use-cases.html @@ -64,6 +64,11 @@

{{ item.heading }}

{% endfor %}