From 1256b5a558f64342df67f75af3dfe7fd45f80994 Mon Sep 17 00:00:00 2001 From: Tiffany Brown Date: Tue, 5 May 2020 15:13:52 -0700 Subject: [PATCH] Glossary, encyclopedia: Add Infrastructure As Code article. (#23431) * Glossary, encyclopedia: Add Infrastructure As Code article. Updated glossary.md with a definition/excerpt and link to new entry. Also updated doc-links.yaml with link to new entry. * Update infrastructure-as-code.md: Fix typos, make as lowercase. Also switch to relative internal links. * Updated infrastructure-as-code.md: Change phrasing. * Move infrastructure-as-code.md to infrastructure-as-code/index.md Add recipes-screenshot.png * infrastructure-as-code/index.md: Change phrasing. * Shorten screenshot alt text * Update doc-links.yaml Co-authored-by: Aisha Blake --- docs/docs/glossary.md | 4 + .../glossary/infrastructure-as-code/index.md | 84 ++++++++++++++++++ .../recipes-screenshot.png | Bin 0 -> 8737 bytes www/src/data/sidebars/doc-links.yaml | 2 + 4 files changed, 90 insertions(+) create mode 100644 docs/docs/glossary/infrastructure-as-code/index.md create mode 100644 docs/docs/glossary/infrastructure-as-code/recipes-screenshot.png diff --git a/docs/docs/glossary.md b/docs/docs/glossary.md index d62be91865a1a..2bf1307759960 100644 --- a/docs/docs/glossary.md +++ b/docs/docs/glossary.md @@ -188,6 +188,10 @@ Once a site has been [built](#build) by Gatsby and loaded in a web browser, [cli As part of its data layer and [build](#build) process, Gatsby will automatically **infer** a [schema](#schema), or type-based structure, based on available data sources (e.g. Markdown file nodes, WordPress posts, etc.). More control can be gained over this structure by using Gatsby's [Schema Customization API](/docs/schema-customization/). +### [Infrastructure As Code](/docs/glossary/infrastructure-as-code/) + +Infrastructure As Code is the practice of using configuration files and scripts to automate the process of setting up your development, testing, and production environments. + ## J ### [JAMStack](/docs/glossary/jamstack) diff --git a/docs/docs/glossary/infrastructure-as-code/index.md b/docs/docs/glossary/infrastructure-as-code/index.md new file mode 100644 index 0000000000000..66adcbac5d26b --- /dev/null +++ b/docs/docs/glossary/infrastructure-as-code/index.md @@ -0,0 +1,84 @@ +--- +title: Infrastructure as Code +disableTableOfContents: true +--- + +Learn what Infrastructure as Code means, and how you can use code to standardize and automate your Gatsby site. + +## What is Infrastructure as Code? + +_Infrastructure as Code_, or IaC, is the practice of managing your development, testing, and production environments using configuration files or scripts. Provisioning and configuring environments individually can introduce errors or inconsistencies. You may, for example, find yourself running different versions of Node on your laptop and your production servers. Infrastructure as Code minimizes this kind of drift and lets you automate the process of provisioning environments. + +Your configuration file describes what resources your project requires. If you're building an API, for example, you might create a configuration file that says, "Please install Node 12.16.2, npm 6.14.4, Express 4.17.1, and PostgreSQL 12.2 for Ubuntu Linux." For a Gatsby project, your configuration file may add plugins and themes. + +Configuration files, like other code files, are text. That means you can use version control software to store them and track changes to the environment. In short, IaC: + +- Creates consistent environments. +- Saves time that would otherwise be spent setting up environments. +- Reduces the risk of errors caused by mismatched environments. +- Lays the groundwork for automation. + +## Automating Gatsby site development with Gatsby Recipes + +[Gatsby Recipes](/blog/2020-04-15-announcing-gatsby-recipes/) applies the infrastructure as code concept to front-end development. With Gatsby Recipes, you can automate common site building tasks, such as adding a plugin or test suite. + +To get started with Gatsby Recipes, upgrade to the latest version of Gatsby and the Gatsby CLI. + +```shell +npm install -g gatsby-cli@latest +npm install gatsby@latest +``` + +You can see the list of available recipes by using `gatsby recipes`. Use your up or down arrow keys to select a recipe, and press the _Enter_ or _Return_ key to run it. + +![partial list of available Gatsby recipes](recipes-screenshot.png) + +Gatsby Recipes use [MDX](/docs/glossary/mdx/). They're a readable mix of Markdown and React. MDX is an extension of [Markdown](/docs/glossary/markdown/) that lets you use [JSX](/docs/glossary#jsx) in Markdown-formatted documents. As an example, check out the [Styled Components recipe](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-recipes/recipes/styled-components.mdx). + +```markdown +# Setup Styled Components + +[Styled Components](https://styled-components.com/) is visual primitives for the component age. +Use the best bits of ES6 and CSS to style your apps without stress 💅 + +--- + +Install necessary NPM packages + + + + + +--- + +Install the Styled Components plugin in gatsby-config.js + + + +--- + +Sweet, now it's ready to go. + +Let's also write out an example page you can use to play +with Styled Components. + + + +--- + +Read more about Styled Components on the official docs site: + +https://styled-components.com/ +``` + +You can also write and run your own recipes, or run recipes that were created by and shared with the community. Pass the path or URL of the recipe as an argument. For example, to run a local Gatsby recipe, use `gatsby recipes ./name-of-your-recipe.mdx`. To run a remote recipe, use `gatsby recipes https://example.com/community-made-recipe.mdx`. + +Gatsby Recipes help you save time and reduce configuration errors by automating the set up process. + +## Learn more + +- [Announcing Gatsby Recipes](/blog/2020-04-15-announcing-gatsby-recipes/) +- [Developing Recipes](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-recipes/README.md#developing-recipes) from the Gatsby repository diff --git a/docs/docs/glossary/infrastructure-as-code/recipes-screenshot.png b/docs/docs/glossary/infrastructure-as-code/recipes-screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..f793151c4a63e2adbb236d246ec8dc5081f69757 GIT binary patch literal 8737 zcmY*f1yoeu)&~jc4(S}Fq&sD3q#L9g=};I#0f!bDLTX^7LmEVC01<>i=@0}ZhXEu8 zW(bw~#{c`?d+V)r);eeHyX)?=_wVj|?@2K+(xD_{CBwtRqtw&YG{eIqh`__ck0m7d zOX2*%jhi@43@o%5ShyA!zdiN|GI(g7n)XUeLcX!7`TF{LIdZw!zT~M2UJV`|H=drR zx<$m&zQd&P@)DhD%ck<;I?b3Yp`A0cuFs&TPgk?dR%K-mQdPf0?0!Rs0Lkb#tp-Te z&DnU7lj=x24=Cu#;CQrILD8aABMLiKAi+6sC+-0^4GH0`|4x@uM?ZJ`bsZyAkIpE& zzn0gW63Q0eYXL@(h#t+)*Inh=2As=!N!z7bVFGgvL;jer8-}&47`ry*Ypsl2*H1^= zPpZhaNdQH^_DkK1;9l?jeVh~ig&N0*Pj7!)Evz1~m+XAf84>DH8)h?X7UMIo1pHxT zGA!A!7zs{7Tr>qO0u}uB5XZmALEA!^f&~#>?N!O1g zj|D4du1;)P36le$iU>5b=$Oa|4^B0mPyc!`%_t#7L^jR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