Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

1116 lines
40 KiB
Markdown
Raw Permalink Normal View History

GREAT WEBSITE MIGRATION OF 2018 (#1269) * Move content into docs/content * Make navigation and doc generation work Signed-off-by: Christian Nunciato <c@nunciato.org> * Make search work Signed-off-by: Christian Nunciato <c@nunciato.org> * Move docs-specific layouts into layouts/docs Signed-off-by: Christian Nunciato <c@nunciato.org> * Move docs partials into layouts/partials/docs Signed-off-by: Christian Nunciato <c@nunciato.org> * Share a common header and footer Signed-off-by: Christian Nunciato <c@nunciato.org> * Add product & pricing pages, modify main nav Signed-off-by: Christian Nunciato <c@nunciato.org> * Bring images under assets, docs images under assets/images/docs Signed-off-by: Christian Nunciato <c@nunciato.org> * Link to the docs home page, fix image ref Signed-off-by: Christian Nunciato <c@nunciato.org> * Add containers, serverless, kubernetes topics Signed-off-by: Christian Nunciato <c@nunciato.org> * Add careers Signed-off-by: Christian Nunciato <c@nunciato.org> * Add compete, compete -> migrate Signed-off-by: Christian Nunciato <c@nunciato.org> * About, contact Signed-off-by: Christian Nunciato <c@nunciato.org> * Add legal Signed-off-by: Christian Nunciato <c@nunciato.org> * Add product Signed-off-by: Christian Nunciato <c@nunciato.org> * Add partner content Signed-off-by: Christian Nunciato <c@nunciato.org> * Add webinar Signed-off-by: Christian Nunciato <c@nunciato.org> * Add why-pulumi Signed-off-by: Christian Nunciato <c@nunciato.org> * Add GitHub redirect, support Signed-off-by: Christian Nunciato <c@nunciato.org> * Add blog * Add blog - update post frontmatter * Update content/_index.md Co-Authored-By: Justin Van Patten <jvp@justinvp.com> * Remove drafts & redundant fonts, move asset dirs up a level Signed-off-by: Christian Nunciato <c@nunciato.org> * Reconcile blog navigation Signed-off-by: Christian Nunciato <c@nunciato.org> * Migrate some blog content (#1147) * Reconcile www, blog and docs footer items (#1141) Signed-off-by: Christian Nunciato <c@nunciato.org> * Clean up blog layout (#1148) * Migrate more blog posts (#1157) * Replace Bootstrap with TailwindCSS * Add Tailwind * Create a config directory under assets, move PostCSS and Tailwind configs into it * Remove Bootstrap Sass and JS referemce * Refactor the header, base template, and footer to use Tailwind * Pull TOC Sass into its own partial Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor the docs home page Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor docs single, list and section layouts Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor quickstart-clouds partial Signed-off-by: Christian Nunciato <c@nunciato.org> * Reposition config items to fix syntax highlighting Signed-off-by: Christian Nunciato <c@nunciato.org> * Replace syntax CSS theme with Monokai Signed-off-by: Christian Nunciato <c@nunciato.org> * Add a dark blue for links Signed-off-by: Christian Nunciato <c@nunciato.org> * Add the beginnings of Sass color settings Signed-off-by: Christian Nunciato <c@nunciato.org> * Add a Sass file for langchoose Signed-off-by: Christian Nunciato <c@nunciato.org> * Give no-select its own Sass also, since it’s a partial Signed-off-by: Christian Nunciato <c@nunciato.org> * Give docs single and list templates more width for main content Signed-off-by: Christian Nunciato <c@nunciato.org> * Add some padding to the TOC, since we don’t have proper gutters yet Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix button on Quickstart home page Signed-off-by: Christian Nunciato <c@nunciato.org> * TOC styles Signed-off-by: Christian Nunciato <c@nunciato.org> * Quickstart clouds Signed-off-by: Christian Nunciato <c@nunciato.org> * Padding to left and right columns Signed-off-by: Christian Nunciato <c@nunciato.org> * Black for TOC Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor docs/aws to use its own layouts Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix the AWS tech partner image Signed-off-by: Christian Nunciato <c@nunciato.org> * Adjust AWS layouts Signed-off-by: Christian Nunciato <c@nunciato.org> * Move docs-home markup into a layout Signed-off-by: Christian Nunciato <c@nunciato.org> * Format the mini-toc Signed-off-by: Christian Nunciato <c@nunciato.org> * Reduce subhead sizes a bit Signed-off-by: Christian Nunciato <c@nunciato.org> * Remove snowflake styles Signed-off-by: Christian Nunciato <c@nunciato.org> * Extract some Sass partials Signed-off-by: Christian Nunciato <c@nunciato.org> * Define initial purple and blue palettes, use numbered colors instead Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor blog templates Signed-off-by: Christian Nunciato <c@nunciato.org> * Make blog summary a partial, style pagination Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix expanded URLs Signed-off-by: Christian Nunciato <c@nunciato.org> * Rename Documentation to Reference Signed-off-by: Christian Nunciato <c@nunciato.org> * A smattering of minor adjustments Signed-off-by: Christian Nunciato <c@nunciato.org> * Selection state for tags Signed-off-by: Christian Nunciato <c@nunciato.org> * Delete more Bootstrap Signed-off-by: Christian Nunciato <c@nunciato.org> * Comment the banner Signed-off-by: Christian Nunciato <c@nunciato.org> * Restore footer links Signed-off-by: Christian Nunciato <c@nunciato.org> * Legal layout Signed-off-by: Christian Nunciato <c@nunciato.org> * Remove unused layout Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor careers page Signed-off-by: Christian Nunciato <c@nunciato.org> * Use top-level URLs for legal docs Signed-off-by: Christian Nunciato <c@nunciato.org> * Add RSS for the blog (#1170) * Add RSS for the blog * Cleanup team data (#1195) * Cleanup team data * Add missing newlines at EOF * Blog content as of 6/16 (#1196) * Blog content layout tweaks * Migrated blog content (as of Sun 6/16) * Address PR feedback, replace links to pulumi.io * Add fusion stack Any changes to the `fusion` branch will now be deployed to https://fusion.pulumi.io/. * Fix broken links * Fix broken images in fusion branch (#1207) Deletes unnecessary uses of `BaseURL`. In a small number of cases, where we want to emit an absolute URL that includes the `BaseURL`, use the `absURL` function instead, which is smart about handling missing/extra slashes. * Integrate www content (#1208) Signed-off-by: Christian Nunciato <c@nunciato.org> * Highlight currently selected section tab (#1216) * Remove unused partials (#1215) These are no longer referenced, so they can be removed. Signed-off-by: Christian Nunciato <c@nunciato.org> * Blog content as of 6/24 (#1218) * Port running-containers-in-aws-the-lowdown-ecs-fargate-and-eks * Port building-and-publishing-docker-images-to-a-private-amazon-ecr-repository * Port happy-birthday-to-pulumi-open-source * Commit updates to package-lock.json * Link cleanups and other fixes * Remove 'wip' tag * Restore meta_* fields, tidy up some frontmatter (#1214) Signed-off-by: Christian Nunciato <c@nunciato.org> * Add search (#1217) Signed-off-by: Christian Nunciato <c@nunciato.org> * Hide `.language-prologue-*` by default (#1212) So they all don't initially flash as being visible before all but the selected language are hidden. Port from `_pulumi.scss`. * Limit team members to those with status “active” (#1219) Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix links to datadog provider * Remove top margin from code snippets under lang tabs (#1223) * Update MBR DNA logo (#1222) * Add links to cloud logos (#1221) And use `logo-aws_white.png` for AWS * Remove unnecessary aliases (#1210) Now that we'll be hosting the docs on a new domain, there's no need to maintain these aliases. The old site hosted at https://pulumi.io will have redirects from the old aliases to the new location on the new site. * Pricing page updates (#1224) * Add swooshes to the home, pricing and webinar pages. * Replace “tech” PNGs for GitHub, GitLab, Atlassian and SAML with SVGs, and add an email SVG, in order to align all of their images in the pricing grid. * Add a “See plan details” link above the pricing grid. * Update Font Awesome to version 5.8.1 (to match what's in use on www today) in order to pull in the infinity icons used in the pricing grid. * Align CTA buttons horizontally in adjacent boxes containing content of varying heights. * Fix duplicate links on the home and product pages. Signed-off-by: Christian Nunciato <c@nunciato.org> * Update API docs (#1227) * Update tsdocgen paths * Updated API docs * Fix broken images (#1228) Remove unnecessary `{{ .Site.BaseURL }}` prefix from image URLs. * Fix Hugo build warning about non-relative ref/relref page reference (#1229) * Fix page titles and errant anchors (#1226) * Prevent anchors on the home page * Fix page titles Signed-off-by: Christian Nunciato <c@nunciato.org> * Add a robots.txt file (#1225) This change adds a robots.txt template authorizing seach-engine indexing for all pages of the production site. It assumes that all non-production builds will override the `baseURL` configuration property with something other than `https://pulumi.com/`. Signed-off-by: Christian Nunciato <c@nunciato.org> * Blog content fixes (#1231) * Correct post dates, titles * Revert to previous tags * Unify tags, adjust for display * Replace short, social summaries with longer ones * Use a fixed height for the utility bar (#1232) When the GitHub widget loads asynchronously and pops into view, it causes the whole page to shift downward a few pixels, because the widget is taller than the links beside it. Applying an explicit hight to the utility bar fixes this. Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix TOC expansion for the tour (#1234) We're very likely going to remove the tour and disperse its content elsewhere, but in the meantime, fix the TOC expansion for "Beyond the Basics" items. * Add syntax highlighing to layout templates (#1238) This change adds a partial for highlighting code snippets in layouts. Signed-off-by: Christian Nunciato <c@nunciato.org> * Add home-page video (#1240) Also makes a few slight adjustments to improve mobile layout on the home page. Signed-off-by: Christian Nunciato <c@nunciato.org> * Blog layout and styling improvements (#1237) * Use explicit code blcoks with language * Fix sort order for Author and Tag listings * Make sidebar toggleable on mobile * Resize "poster" image for blog listings * Crop photos to be square * Add posted date, post tags to blog footer * Add recent posts lists to sidebar * Add syntax highlighting to some missed posts * Fix Hugo build warning * Adjust sidebar styling * Cleanup the /docs page (#1239) * Cleanup /docs/aws layouts to match other docs sections * Cleanup /docs pages - Add left nav - Make /docs page look slightly less like a "homepage" - Add top-level "Get Started" and "Reference" headings to left nav * Add `.btn-secondary` and use it in a few places * Remove unnecessary cursor setting (#1245) Should be using the default here. I was debugging and forgot to switch this back before committing. Signed-off-by: Christian Nunciato <c@nunciato.org> * Update the home page video (#1244) This is a slightly shorter version, with typing sections sped up slightly to better respect our visitors’ time. :smile: Signed-off-by: Christian Nunciato <c@nunciato.org> * API doc styling improvements (#1247) * Update API doc styling for Python Bring back the styles used for our Python API docs, convert to use Tailwind, and make further tweaks to make it look even better. For example, all definitions now look like code blocks and indentation and spacing is used to improve the hierarchy of the content. * Only emit the <h1>.Title</h1> if there is a .Title The generated Python API docs don't currently include front matter and therefore do not have a title. We should fix the Python docs gen to do that, but in the meantime, only emit `<h1>.Title</h1>` if the page has a `.Title`, to avoid an unnecessary gap at the top of the page. * Update _pygments.scss to select .highlight instead of .chroma The syntax highlighted code generated by Hugo looks like: ``` <div class="highlight"> <pre class="chroma"> <code class="language-foo"> ... </code> </pre> </div> ``` And our styles looks like: ``` .chroma .k { ... } .chroma .kc { ... } ... ``` This works good, but our generated Python docs, which uses Pygments to do the syntax highlighting, doesn't use `.chroma`, so it doesn't get any syntax highlighting currently, even though all the Pygments classes are there. This is true for our Node.js docs as well, although, based on how we generate the code for that currently, we could relatively easily update the templates to include a `.chroma` class. In all cases, the code that we want highlighted will have a `.highlight` class surrounding it, so just update our styles to select `.highlight` instead of `.chroma`. ``` .highlight .k { ... } .highlight .kc { ... } ... ``` * Update API doc styling for Node.js * Various mobile adjustments and cleanup (#1250) * Pull the hero and section nav into Tailwind "components" and apply them. * Adjust home-page video dimensions accordingly. * Add mobile x-padding to sections that hadn't gotten it yet. * Add an anchor exclusion to the head for the About page. * Fix mobile layout for the Support page. * Fix centering and item distribution on the About page. * Additional minor mobile-related adjustments as encountered. Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix bug in lang chooser (#1249) If I've previously viewed a page in our docs with the language tabs, such as the Get Started guide, and I click the Python tab, that language choice will be persisted to a cookie. If I then visit our Node.js API docs, the lang chooser will see the saved value of "Python" and try to select that tab, hiding all other language snippets. But our Node.js API docs only contain JavaScript and TypeScript snippets, so the end result is that all snippets are hidden and no tab is selected. This change fixes that. If the value in the cookie does not exist in any of the tabs on the page, fallback to the default (JavaScript), otherwise fallback to the first tab that is available on the page. * More small fixes (#1254) * Make the header more responsive Adds padding to medium and above, and adjusts font size and spacing at medium width in order to accommodate the number of items we’re displaying currently. Also uses the full Pulumi logo, since we have room for that now, and adds a little color to the hamburger. Signed-off-by: Christian Nunciato <c@nunciato.org> * Bottom-align the image on the whitepaper layout Also removes the `header` selector from `_hero.scss` in order to reduce the specificity of the rule, allowing it to be overidden more easily with other Tailwind classnames. Signed-off-by: Christian Nunciato <c@nunciato.org> * Add team@pulumi link to the footer Signed-off-by: Christian Nunciato <c@nunciato.org> * Restore the newsroom and investors sections Somehow these got dropped! :scream: Signed-off-by: Christian Nunciato <c@nunciato.org> * Add hero background glows (#1257) Also deletes unused templates. Signed-off-by: Christian Nunciato <c@nunciato.org> * Hide scrollbars if not needed (#1256) * Improve Pricing page responsiveness, fix a few other small things (#1259) * Fix section link on the Why Pulumi page Signed-off-by: Christian Nunciato <c@nunciato.org> * Capitalize Kubernetes in copy Signed-off-by: Christian Nunciato <c@nunciato.org> * Adjust image sizes on Whitepaper page Properly size them on both mobile and desktop. Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix paging on mobile Decrease padding to prevent overflow. Signed-off-by: Christian Nunciato <c@nunciato.org> * Improve Pricing page layout Signed-off-by: Christian Nunciato <c@nunciato.org> * Replace home page video with carousel (#1260) Signed-off-by: Christian Nunciato <c@nunciato.org> * Change Segment module to WWW (#1265) * Hook up new www.pulumi.com/staging stack to CI/CD (#1262) * Move older 'pulumi.io' stacks to infrastructure-old * Add new 'www.pulumi.com' infrastructure folder * Scripts to hook up to CI/CD * Switch back to using generic Travis worker * Add alias to CDN for staging.pulumi.io * Remove alias to staging.pulumi.io * Do not use named profiles for deployments There's an issue today where named profiles which use `credential_source=Environment` don't actually behave correctly with the assume-role tool. Instead of actually assuming the role, it just uses the credentials in the environment, which is not exactly what you want. For now, explicitly set the ARN we want to assume, instead of indirecting across a named profile. * Remove CloudFront alias entirely * Add hover menu (#1266) Signed-off-by: Christian Nunciato <c@nunciato.org> * Hook up new www.pulumi.com/production stack to CI/CD (#1267) * Hook up new www.pulumi.com/production stack to CI/CD * Correct Makefile syntax * Migrate blog posts as of 7/2 (#1268) * Fix Makefile syntax * Fix spelling error ::sigh::
2019-07-02 16:30:33 -07:00
---
title: Cloud Infrastructure as Code for Google Cloud
GREAT WEBSITE MIGRATION OF 2018 (#1269) * Move content into docs/content * Make navigation and doc generation work Signed-off-by: Christian Nunciato <c@nunciato.org> * Make search work Signed-off-by: Christian Nunciato <c@nunciato.org> * Move docs-specific layouts into layouts/docs Signed-off-by: Christian Nunciato <c@nunciato.org> * Move docs partials into layouts/partials/docs Signed-off-by: Christian Nunciato <c@nunciato.org> * Share a common header and footer Signed-off-by: Christian Nunciato <c@nunciato.org> * Add product & pricing pages, modify main nav Signed-off-by: Christian Nunciato <c@nunciato.org> * Bring images under assets, docs images under assets/images/docs Signed-off-by: Christian Nunciato <c@nunciato.org> * Link to the docs home page, fix image ref Signed-off-by: Christian Nunciato <c@nunciato.org> * Add containers, serverless, kubernetes topics Signed-off-by: Christian Nunciato <c@nunciato.org> * Add careers Signed-off-by: Christian Nunciato <c@nunciato.org> * Add compete, compete -> migrate Signed-off-by: Christian Nunciato <c@nunciato.org> * About, contact Signed-off-by: Christian Nunciato <c@nunciato.org> * Add legal Signed-off-by: Christian Nunciato <c@nunciato.org> * Add product Signed-off-by: Christian Nunciato <c@nunciato.org> * Add partner content Signed-off-by: Christian Nunciato <c@nunciato.org> * Add webinar Signed-off-by: Christian Nunciato <c@nunciato.org> * Add why-pulumi Signed-off-by: Christian Nunciato <c@nunciato.org> * Add GitHub redirect, support Signed-off-by: Christian Nunciato <c@nunciato.org> * Add blog * Add blog - update post frontmatter * Update content/_index.md Co-Authored-By: Justin Van Patten <jvp@justinvp.com> * Remove drafts & redundant fonts, move asset dirs up a level Signed-off-by: Christian Nunciato <c@nunciato.org> * Reconcile blog navigation Signed-off-by: Christian Nunciato <c@nunciato.org> * Migrate some blog content (#1147) * Reconcile www, blog and docs footer items (#1141) Signed-off-by: Christian Nunciato <c@nunciato.org> * Clean up blog layout (#1148) * Migrate more blog posts (#1157) * Replace Bootstrap with TailwindCSS * Add Tailwind * Create a config directory under assets, move PostCSS and Tailwind configs into it * Remove Bootstrap Sass and JS referemce * Refactor the header, base template, and footer to use Tailwind * Pull TOC Sass into its own partial Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor the docs home page Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor docs single, list and section layouts Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor quickstart-clouds partial Signed-off-by: Christian Nunciato <c@nunciato.org> * Reposition config items to fix syntax highlighting Signed-off-by: Christian Nunciato <c@nunciato.org> * Replace syntax CSS theme with Monokai Signed-off-by: Christian Nunciato <c@nunciato.org> * Add a dark blue for links Signed-off-by: Christian Nunciato <c@nunciato.org> * Add the beginnings of Sass color settings Signed-off-by: Christian Nunciato <c@nunciato.org> * Add a Sass file for langchoose Signed-off-by: Christian Nunciato <c@nunciato.org> * Give no-select its own Sass also, since it’s a partial Signed-off-by: Christian Nunciato <c@nunciato.org> * Give docs single and list templates more width for main content Signed-off-by: Christian Nunciato <c@nunciato.org> * Add some padding to the TOC, since we don’t have proper gutters yet Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix button on Quickstart home page Signed-off-by: Christian Nunciato <c@nunciato.org> * TOC styles Signed-off-by: Christian Nunciato <c@nunciato.org> * Quickstart clouds Signed-off-by: Christian Nunciato <c@nunciato.org> * Padding to left and right columns Signed-off-by: Christian Nunciato <c@nunciato.org> * Black for TOC Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor docs/aws to use its own layouts Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix the AWS tech partner image Signed-off-by: Christian Nunciato <c@nunciato.org> * Adjust AWS layouts Signed-off-by: Christian Nunciato <c@nunciato.org> * Move docs-home markup into a layout Signed-off-by: Christian Nunciato <c@nunciato.org> * Format the mini-toc Signed-off-by: Christian Nunciato <c@nunciato.org> * Reduce subhead sizes a bit Signed-off-by: Christian Nunciato <c@nunciato.org> * Remove snowflake styles Signed-off-by: Christian Nunciato <c@nunciato.org> * Extract some Sass partials Signed-off-by: Christian Nunciato <c@nunciato.org> * Define initial purple and blue palettes, use numbered colors instead Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor blog templates Signed-off-by: Christian Nunciato <c@nunciato.org> * Make blog summary a partial, style pagination Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix expanded URLs Signed-off-by: Christian Nunciato <c@nunciato.org> * Rename Documentation to Reference Signed-off-by: Christian Nunciato <c@nunciato.org> * A smattering of minor adjustments Signed-off-by: Christian Nunciato <c@nunciato.org> * Selection state for tags Signed-off-by: Christian Nunciato <c@nunciato.org> * Delete more Bootstrap Signed-off-by: Christian Nunciato <c@nunciato.org> * Comment the banner Signed-off-by: Christian Nunciato <c@nunciato.org> * Restore footer links Signed-off-by: Christian Nunciato <c@nunciato.org> * Legal layout Signed-off-by: Christian Nunciato <c@nunciato.org> * Remove unused layout Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor careers page Signed-off-by: Christian Nunciato <c@nunciato.org> * Use top-level URLs for legal docs Signed-off-by: Christian Nunciato <c@nunciato.org> * Add RSS for the blog (#1170) * Add RSS for the blog * Cleanup team data (#1195) * Cleanup team data * Add missing newlines at EOF * Blog content as of 6/16 (#1196) * Blog content layout tweaks * Migrated blog content (as of Sun 6/16) * Address PR feedback, replace links to pulumi.io * Add fusion stack Any changes to the `fusion` branch will now be deployed to https://fusion.pulumi.io/. * Fix broken links * Fix broken images in fusion branch (#1207) Deletes unnecessary uses of `BaseURL`. In a small number of cases, where we want to emit an absolute URL that includes the `BaseURL`, use the `absURL` function instead, which is smart about handling missing/extra slashes. * Integrate www content (#1208) Signed-off-by: Christian Nunciato <c@nunciato.org> * Highlight currently selected section tab (#1216) * Remove unused partials (#1215) These are no longer referenced, so they can be removed. Signed-off-by: Christian Nunciato <c@nunciato.org> * Blog content as of 6/24 (#1218) * Port running-containers-in-aws-the-lowdown-ecs-fargate-and-eks * Port building-and-publishing-docker-images-to-a-private-amazon-ecr-repository * Port happy-birthday-to-pulumi-open-source * Commit updates to package-lock.json * Link cleanups and other fixes * Remove 'wip' tag * Restore meta_* fields, tidy up some frontmatter (#1214) Signed-off-by: Christian Nunciato <c@nunciato.org> * Add search (#1217) Signed-off-by: Christian Nunciato <c@nunciato.org> * Hide `.language-prologue-*` by default (#1212) So they all don't initially flash as being visible before all but the selected language are hidden. Port from `_pulumi.scss`. * Limit team members to those with status “active” (#1219) Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix links to datadog provider * Remove top margin from code snippets under lang tabs (#1223) * Update MBR DNA logo (#1222) * Add links to cloud logos (#1221) And use `logo-aws_white.png` for AWS * Remove unnecessary aliases (#1210) Now that we'll be hosting the docs on a new domain, there's no need to maintain these aliases. The old site hosted at https://pulumi.io will have redirects from the old aliases to the new location on the new site. * Pricing page updates (#1224) * Add swooshes to the home, pricing and webinar pages. * Replace “tech” PNGs for GitHub, GitLab, Atlassian and SAML with SVGs, and add an email SVG, in order to align all of their images in the pricing grid. * Add a “See plan details” link above the pricing grid. * Update Font Awesome to version 5.8.1 (to match what's in use on www today) in order to pull in the infinity icons used in the pricing grid. * Align CTA buttons horizontally in adjacent boxes containing content of varying heights. * Fix duplicate links on the home and product pages. Signed-off-by: Christian Nunciato <c@nunciato.org> * Update API docs (#1227) * Update tsdocgen paths * Updated API docs * Fix broken images (#1228) Remove unnecessary `{{ .Site.BaseURL }}` prefix from image URLs. * Fix Hugo build warning about non-relative ref/relref page reference (#1229) * Fix page titles and errant anchors (#1226) * Prevent anchors on the home page * Fix page titles Signed-off-by: Christian Nunciato <c@nunciato.org> * Add a robots.txt file (#1225) This change adds a robots.txt template authorizing seach-engine indexing for all pages of the production site. It assumes that all non-production builds will override the `baseURL` configuration property with something other than `https://pulumi.com/`. Signed-off-by: Christian Nunciato <c@nunciato.org> * Blog content fixes (#1231) * Correct post dates, titles * Revert to previous tags * Unify tags, adjust for display * Replace short, social summaries with longer ones * Use a fixed height for the utility bar (#1232) When the GitHub widget loads asynchronously and pops into view, it causes the whole page to shift downward a few pixels, because the widget is taller than the links beside it. Applying an explicit hight to the utility bar fixes this. Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix TOC expansion for the tour (#1234) We're very likely going to remove the tour and disperse its content elsewhere, but in the meantime, fix the TOC expansion for "Beyond the Basics" items. * Add syntax highlighing to layout templates (#1238) This change adds a partial for highlighting code snippets in layouts. Signed-off-by: Christian Nunciato <c@nunciato.org> * Add home-page video (#1240) Also makes a few slight adjustments to improve mobile layout on the home page. Signed-off-by: Christian Nunciato <c@nunciato.org> * Blog layout and styling improvements (#1237) * Use explicit code blcoks with language * Fix sort order for Author and Tag listings * Make sidebar toggleable on mobile * Resize "poster" image for blog listings * Crop photos to be square * Add posted date, post tags to blog footer * Add recent posts lists to sidebar * Add syntax highlighting to some missed posts * Fix Hugo build warning * Adjust sidebar styling * Cleanup the /docs page (#1239) * Cleanup /docs/aws layouts to match other docs sections * Cleanup /docs pages - Add left nav - Make /docs page look slightly less like a "homepage" - Add top-level "Get Started" and "Reference" headings to left nav * Add `.btn-secondary` and use it in a few places * Remove unnecessary cursor setting (#1245) Should be using the default here. I was debugging and forgot to switch this back before committing. Signed-off-by: Christian Nunciato <c@nunciato.org> * Update the home page video (#1244) This is a slightly shorter version, with typing sections sped up slightly to better respect our visitors’ time. :smile: Signed-off-by: Christian Nunciato <c@nunciato.org> * API doc styling improvements (#1247) * Update API doc styling for Python Bring back the styles used for our Python API docs, convert to use Tailwind, and make further tweaks to make it look even better. For example, all definitions now look like code blocks and indentation and spacing is used to improve the hierarchy of the content. * Only emit the <h1>.Title</h1> if there is a .Title The generated Python API docs don't currently include front matter and therefore do not have a title. We should fix the Python docs gen to do that, but in the meantime, only emit `<h1>.Title</h1>` if the page has a `.Title`, to avoid an unnecessary gap at the top of the page. * Update _pygments.scss to select .highlight instead of .chroma The syntax highlighted code generated by Hugo looks like: ``` <div class="highlight"> <pre class="chroma"> <code class="language-foo"> ... </code> </pre> </div> ``` And our styles looks like: ``` .chroma .k { ... } .chroma .kc { ... } ... ``` This works good, but our generated Python docs, which uses Pygments to do the syntax highlighting, doesn't use `.chroma`, so it doesn't get any syntax highlighting currently, even though all the Pygments classes are there. This is true for our Node.js docs as well, although, based on how we generate the code for that currently, we could relatively easily update the templates to include a `.chroma` class. In all cases, the code that we want highlighted will have a `.highlight` class surrounding it, so just update our styles to select `.highlight` instead of `.chroma`. ``` .highlight .k { ... } .highlight .kc { ... } ... ``` * Update API doc styling for Node.js * Various mobile adjustments and cleanup (#1250) * Pull the hero and section nav into Tailwind "components" and apply them. * Adjust home-page video dimensions accordingly. * Add mobile x-padding to sections that hadn't gotten it yet. * Add an anchor exclusion to the head for the About page. * Fix mobile layout for the Support page. * Fix centering and item distribution on the About page. * Additional minor mobile-related adjustments as encountered. Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix bug in lang chooser (#1249) If I've previously viewed a page in our docs with the language tabs, such as the Get Started guide, and I click the Python tab, that language choice will be persisted to a cookie. If I then visit our Node.js API docs, the lang chooser will see the saved value of "Python" and try to select that tab, hiding all other language snippets. But our Node.js API docs only contain JavaScript and TypeScript snippets, so the end result is that all snippets are hidden and no tab is selected. This change fixes that. If the value in the cookie does not exist in any of the tabs on the page, fallback to the default (JavaScript), otherwise fallback to the first tab that is available on the page. * More small fixes (#1254) * Make the header more responsive Adds padding to medium and above, and adjusts font size and spacing at medium width in order to accommodate the number of items we’re displaying currently. Also uses the full Pulumi logo, since we have room for that now, and adds a little color to the hamburger. Signed-off-by: Christian Nunciato <c@nunciato.org> * Bottom-align the image on the whitepaper layout Also removes the `header` selector from `_hero.scss` in order to reduce the specificity of the rule, allowing it to be overidden more easily with other Tailwind classnames. Signed-off-by: Christian Nunciato <c@nunciato.org> * Add team@pulumi link to the footer Signed-off-by: Christian Nunciato <c@nunciato.org> * Restore the newsroom and investors sections Somehow these got dropped! :scream: Signed-off-by: Christian Nunciato <c@nunciato.org> * Add hero background glows (#1257) Also deletes unused templates. Signed-off-by: Christian Nunciato <c@nunciato.org> * Hide scrollbars if not needed (#1256) * Improve Pricing page responsiveness, fix a few other small things (#1259) * Fix section link on the Why Pulumi page Signed-off-by: Christian Nunciato <c@nunciato.org> * Capitalize Kubernetes in copy Signed-off-by: Christian Nunciato <c@nunciato.org> * Adjust image sizes on Whitepaper page Properly size them on both mobile and desktop. Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix paging on mobile Decrease padding to prevent overflow. Signed-off-by: Christian Nunciato <c@nunciato.org> * Improve Pricing page layout Signed-off-by: Christian Nunciato <c@nunciato.org> * Replace home page video with carousel (#1260) Signed-off-by: Christian Nunciato <c@nunciato.org> * Change Segment module to WWW (#1265) * Hook up new www.pulumi.com/staging stack to CI/CD (#1262) * Move older 'pulumi.io' stacks to infrastructure-old * Add new 'www.pulumi.com' infrastructure folder * Scripts to hook up to CI/CD * Switch back to using generic Travis worker * Add alias to CDN for staging.pulumi.io * Remove alias to staging.pulumi.io * Do not use named profiles for deployments There's an issue today where named profiles which use `credential_source=Environment` don't actually behave correctly with the assume-role tool. Instead of actually assuming the role, it just uses the credentials in the environment, which is not exactly what you want. For now, explicitly set the ARN we want to assume, instead of indirecting across a named profile. * Remove CloudFront alias entirely * Add hover menu (#1266) Signed-off-by: Christian Nunciato <c@nunciato.org> * Hook up new www.pulumi.com/production stack to CI/CD (#1267) * Hook up new www.pulumi.com/production stack to CI/CD * Correct Makefile syntax * Migrate blog posts as of 7/2 (#1268) * Fix Makefile syntax * Fix spelling error ::sigh::
2019-07-02 16:30:33 -07:00
layout: gcp
url: /gcp
2022-05-03 21:23:32 -07:00
hero:
ide:
tabs:
- title: index.ts
language: typescript
code: |
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const bucket = new gcp.storage.Bucket("bucket", {
location: "US",
});
export const bucketName = bucket.url;
- title: __main__.py
language: python
code: |
import pulumi
import pulumi_gcp as gcp
bucket = gcp.storage.Bucket("static-site",
location="US")
pulumi.export('bucket_name', bucket.url)
- title: main.go
language: go
code: |
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/storage"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
bucket, err := storage.NewBucket(ctx, "my-bucket", &storage.BucketArgs{
Location: pulumi.String("US"),
})
if err != nil {
return err
}
ctx.Export("bucketName", bucket.Url)
return nil
})
}
- title: MyStack.cs
language: csharp
code: |
using Pulumi;
using Pulumi.Gcp.Storage;
class MyStack : Stack
{
public MyStack()
{
var bucket = new Bucket("my-bucket");
// Export the DNS name of the bucket
this.BucketName = bucket.Url;
}
[Output]
public Output<string> BucketName { get; set; }
}
- title: Pulumi.yaml
language: yaml
code: |
name: gcp-bucket
runtime: yaml
description: A simple Pulumi program.
resources:
bucket:
type: gcp:storage:Bucket
properties:
location: "US"
outputs:
bucketName: ${bucket.url}
- title: Main.java
language: java
code: |
package com.pulumi.example.infra;
import com.pulumi.Context;
import com.pulumi.Exports;
import com.pulumi.Pulumi;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
public class Main {
public static void main(String[] args) {
Pulumi.run(Main::stack);
}
private static Exports stack(Context ctx) {
var bucket = new Bucket("bucket",
BucketArgs.builder()
.location("US"
.build());
ctx.export("bucketName", bucket.url);
return ctx.exports();
}
}
package:
ts: |
import * as pulumi from "@pulumi/pulumi";
import * as cloudrun from "@pulumi/gcp-global-cloudrun";
const conf = new pulumi.Config()
const project = conf.require("project")
const deployment = new cloudrun.Deployment("my-sample-deployment", {
projectId: project,
imageName: "gcr.io/ahmetb-public/zoneprinter",
serviceName: "demo-service-ts"
});
export const ip = deployment.ipAddress;
py: |
import pulumi
import pulumi_gcp_global_cloudrun as cloudrun
config = pulumi.Config()
project = config.require("project")
deployment = cloudrun.Deployment("my-sample-deployment",
project_id=project,
image_name="gcr.io/ahmetb-public/zoneprinter",
service_name="demo-service-py")
pulumi.export('ip', deployment.ip_address)
go: |
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
cloudrun "github.com/pulumi/pulumi-gcp-global-cloudrun/sdk/go/gcp"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
c := config.New(ctx, "")
project := c.Require("project")
deployment, err := cloudrun.NewDeployment(ctx, "demo-deployment-go", &cloudrun.DeploymentArgs{
ImageName: pulumi.String("gcr.io/ahmetb-public/zoneprinter"),
ServiceName: "demo-service-ts",
ProjectId: project,
})
if err != nil {
return err
}
ctx.Export("ip", deployment.IpAddress)
return nil
})
}
csharp: |
using Pulumi;
using Pulumi.GcpGlobalCloudRun.Deployment;
using Pulumi.GcpGlobalCloudRun.DeploymentArgs;
class MyStack: Stack
{
public MyStack()
{
var config = new Config("gcp-cloud-run");
var project = config.Require("project");
var deployment = new Deployment("demo-deployment-csharp", new DeploymentArgs{
ImageName = "gcr.io/ahmetb-public/zoneprinter",
ServiceName = "demo-service-csharp",
ProjectId = project,
});
this.IP = deployment.IpAddress;
}
[Output]
public Output<string> IP { get; set; }
}
java: |
package gcpglobalcloudrunexample;
import com.pulumi.Context;
import com.pulumi.Exports;
import com.pulumi.Pulumi;
import com.pulumi.gcpglobalcloudrun.Deployment;
import com.pulumi.gcpglobalcloudrun.DeploymentArgs;
public class Main {
public static void main(String[] args) {
Pulumi.run(Main::stack);
}
private static Exports stack(Context ctx) {
var config = ctx.config();
var project = config.require("project");
var deployment = new Deployment("demo-deployment-java", DeploymentArgs.builder()
.imageName("gcr.io/ahmetb-public/zoneprinter")
.serviceName("demo-service-java")
.projectId(project)
.build());
ctx.exports("ip", deployment.ipAddress);
return ctx.exports();
}
}
yaml: |
name: gcp-cloud-run
runtime: yaml
description: A simple Pulumi program.
configuration:
project:
type: String
default: "project"
resources:
deployment:
type: gcp-global-cloudrun:index:Deployment
properties:
imageName: "gcr.io/ahmetb-public/zoneprinter"
serviceName: "demo-service-yaml"
projectId: ${project}
outputs:
ip: ${deployment.ipAddress}
native:
java: |
package googlenative;
import com.pulumi.Context;
import com.pulumi.Exports;
import com.pulumi.Pulumi;
import com.pulumi.googlenative.storage_v1.Bucket;
import com.pulumi.googlenative.storage_v1.BucketArgs;
public class Main {
public static void main(String[] args) {
Pulumi.run(Main::stack);
}
private static Exports stack(Context ctx) {
var config = ctx.config();
var project = config.require("project");
var bucketName = "pulumi-goog-native-bucket-cs-01";
var bucket = new Bucket("my-bucket", BucketArgs.builder()
.name(bucketName)
.bucket(bucketName)
.project(project)
.build());
ctx.export("bucketName", bucket.selfLink);
return ctx.exports();
}
}
yaml: |
name: gcp-native
runtime: yaml
description: A simple Pulumi program.
configuration:
project:
type: String
default: "my-bucket"
resources:
bucket:
type:
properties:
name: "pulumi-goog-native-bucket-cs-01"
bucket: "pulumi-goog-native-bucket-cs-01"
project: ${project}
outputs:
bucketName: ${bucket.selfLink}
csharp: |
using System.Threading.Tasks;
using Pulumi;
using Pulumi.GoogleNative.Storage.V1;
class Program
{
static Task Main() =>
Deployment.Run(() => {
var config = new Config("google-native");
var project = config.Require("project");
var bucketName = "pulumi-goog-native-bucket-cs-01";
// Create a Google Cloud resource (Storage Bucket)
var bucket = new Bucket("my-bucket", new BucketArgs{
Name = bucketName,
Bucket = bucketName,
Project = project,
});
});
}
go: |
package main
import (
storage "github.com/pulumi/pulumi-google-native/sdk/go/google/storage/v1"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
const bucketName = "pulumi-goog-native-bucket-go-01"
pulumi.Run(func(ctx *pulumi.Context) error {
conf := config.New(ctx, "google-native")
project := conf.Require("project")
// Create a Google Cloud resource (Storage Bucket)
bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
Name: pulumi.StringPtr(bucketName),
Bucket: pulumi.String(project),
Project: project,
})
if err != nil {
return err
}
// Export the bucket self-link
ctx.Export("bucket", bucket.SelfLink)
return nil
})
}
py: |
import pulumi
from pulumi_google_native.storage import v1 as storage
config = pulumi.Config()
project = config.require('project')
# Create a Google Cloud resource (Storage Bucket)
bucket_name = "pulumi-goog-native-bucket-py-01"
bucket = storage.Bucket('my-bucket', name=bucket_name, bucket=bucket_name, project=project)
# Export the bucket self-link
pulumi.export('bucket', bucket.self_link)
ts: |
import * as storage from "@pulumi/google-native/storage/v1";
import * as pulumi from "@pulumi/pulumi";
const config = new pulumi.Config("google-native");
const project = config.require("project");
const bucketName = "pulumi-goog-native-ts-01";
// Create a Google Cloud resource (Storage Bucket)
const bucket = new storage.Bucket("my-bucket", {
name:bucketName,
bucket:bucketName,
project: project,
});
// Export the bucket self-link
export const bucketName = bucket.selfLink;
gke:
java: |
package gcpgke;
import com.pulumi.Context;
import com.pulumi.Exports;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import com.pulumi.gcp.container.ContainerFunctions;
import com.pulumi.gcp.container.NodePool;
import com.pulumi.gcp.container.NodePoolArgs;
import com.pulumi.gcp.container.inputs.NodePoolManagementArgs;
import com.pulumi.gcp.container.inputs.NodePoolNodeConfigArgs;
import com.pulumi.gcp.container.outputs.GetEngineVersionsResult;
import com.pulumi.kubernetes.Provider;
import com.pulumi.kubernetes.ProviderArgs;
import com.pulumi.kubernetes.apps_v1.Deployment;
import com.pulumi.kubernetes.apps_v1.DeploymentArgs;
import com.pulumi.kubernetes.apps_v1.inputs.DeploymentSpecArgs;
import com.pulumi.kubernetes.core_v1.Namespace;
import com.pulumi.kubernetes.core_v1.NamespaceArgs;
import com.pulumi.kubernetes.core_v1.Service;
import com.pulumi.kubernetes.core_v1.ServiceArgs;
import com.pulumi.kubernetes.core_v1.enums.ServiceSpecType;
import com.pulumi.kubernetes.core_v1.inputs.ContainerArgs;
import com.pulumi.kubernetes.core_v1.inputs.ContainerPortArgs;
import com.pulumi.kubernetes.core_v1.inputs.PodSpecArgs;
import com.pulumi.kubernetes.core_v1.inputs.PodTemplateSpecArgs;
import com.pulumi.kubernetes.core_v1.inputs.ServicePortArgs;
import com.pulumi.kubernetes.core_v1.inputs.ServiceSpecArgs;
import com.pulumi.kubernetes.meta_v1.inputs.LabelSelectorArgs;
import com.pulumi.kubernetes.meta_v1.inputs.ObjectMetaArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.text.MessageFormat;
import java.util.Map;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
private static Exports stack(Context ctx) {
final String name = "helloworld";
final var masterVersion = ctx.config().get("masterVersion").orElse(
ContainerFunctions.getEngineVersions()
.thenApply(GetEngineVersionsResult::latestMasterVersion).join()
);
ctx.export("masterVersion", Output.of(masterVersion));
// Create a GKE cluster
// We can't create a cluster with no node pool defined, but we want to only use
// separately managed node pools. So we create the smallest possible default
// node pool and immediately delete it.
final var cluster = new Cluster(name,
ClusterArgs.builder().initialNodeCount(1)
.removeDefaultNodePool(true)
.minMasterVersion(masterVersion)
.build()
);
final var nodePool = new NodePool("primary-node-pool",
NodePoolArgs.builder()
.cluster(cluster.name())
.location(cluster.location())
.version(masterVersion)
.initialNodeCount(2)
.nodeConfig(NodePoolNodeConfigArgs.builder()
.preemptible(true)
.machineType("n1-standard-1")
.oauthScopes(
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring"
)
.build()
)
.management(NodePoolManagementArgs.builder()
.autoRepair(true)
.build()
)
.build(),
CustomResourceOptions.builder()
.dependsOn(cluster)
.build());
ctx.export("clusterName", cluster.name());
// Manufacture a GKE-style kubeconfig. Note that this is slightly "different"
// because of the way GKE requires gcloud to be in the picture for cluster
// authentication (rather than using the client cert/key directly).
final var gcpConfig = new com.pulumi.gcp.Config();
var clusterName = String.format("%s_%s_%s",
gcpConfig.project().orElseThrow(),
gcpConfig.zone().orElseThrow(),
name
);
var masterAuthClusterCaCertificate = cluster.masterAuth()
.applyValue(a -> a.clusterCaCertificate().orElseThrow());
var kubeconfig = cluster.endpoint()
.apply(endpoint -> masterAuthClusterCaCertificate.applyValue(
caCert -> MessageFormat.format(String.join("\n",
"apiVersion: v1",
"clusters:",
"- cluster:",
" certificate-authority-data: {2}",
" server: https://{1}",
" name: {0}",
"contexts:",
"- context:",
" cluster: {0}",
" user: {0}",
" name: {0}",
"current-context: {0}",
"kind: Config",
"preferences: '{}'",
"users:",
"- name: {0}",
" user:",
" auth-provider:",
" config:",
" cmd-args: config config-helper --format=json",
" cmd-path: gcloud",
" expiry-key: \"'{.credential.token_expiry}'\"",
" token-key: \"'{.credential.access_token}'\"",
" name: gcp"
), clusterName, endpoint, caCert)
));
ctx.export("kubeconfig", kubeconfig);
// Create a Kubernetes provider instance that uses our cluster from above.
final var clusterProvider = new Provider(name,
ProviderArgs.builder()
.kubeconfig(kubeconfig)
.build(),
CustomResourceOptions.builder()
.dependsOn(nodePool, cluster)
.build()
);
final var clusterResourceOptions = CustomResourceOptions.builder()
.provider(clusterProvider)
.build();
// Create a Kubernetes Namespace
final var ns = new Namespace(name,
NamespaceArgs.Empty,
clusterResourceOptions
);
// Export the Namespace name
var namespaceName = ns.metadata()
.applyValue(m -> m.orElseThrow().name().orElseThrow());
ctx.export("namespaceName", namespaceName);
final var appLabels = Map.of("appClass", name);
final var metadata = ObjectMetaArgs.builder()
.namespace(namespaceName)
.labels(appLabels)
.build();
// Create a NGINX Deployment
final var deployment = new Deployment(name, DeploymentArgs.builder()
.metadata(metadata)
.spec(DeploymentSpecArgs.builder()
.replicas(1)
.selector(LabelSelectorArgs.builder()
.matchLabels(appLabels)
.build())
.template(PodTemplateSpecArgs.builder()
.metadata(metadata)
.spec(PodSpecArgs.builder()
.containers(ContainerArgs.builder()
.name(name)
.image("nginx:latest")
.ports(ContainerPortArgs.builder()
.name("http")
.containerPort(80)
.build())
.build())
.build())
.build())
.build())
.build(), clusterResourceOptions);
// Export the Deployment name
ctx.export("deploymentName", deployment.metadata()
.applyValue(m -> m.orElseThrow().name().orElseThrow()));
// Create a LoadBalancer Service for the NGINX Deployment
final var service = new Service(name, ServiceArgs.builder()
.metadata(metadata)
.spec(ServiceSpecArgs.builder()
.type(Output.ofRight(ServiceSpecType.LoadBalancer))
.ports(ServicePortArgs.builder()
.port(80)
.targetPort(Output.ofRight("http"))
.build())
.selector(appLabels)
.build())
.build(), clusterResourceOptions);
// Export the Service name and public LoadBalancer endpoint
ctx.export("serviceName", service.metadata()
.applyValue(m -> m.orElseThrow().name().orElseThrow()));
ctx.export("servicePublicIP", service.status()
.applyValue(s -> s.orElseThrow().loadBalancer().orElseThrow())
.applyValue(status -> status.ingress().get(0).ip().orElseThrow()));
return ctx.exports();
}
}
csharp: |
using Pulumi;
using Pulumi.Gcp.Container;
using Pulumi.Gcp.Container.Inputs;
using Pulumi.Gcp.Container.Outputs;
class KubernetesStack : Stack
{
public KubernetesStack()
{
var masterVersion = new Config().Get("masterVersion")
?? (Input<string>) Output.Create(GetEngineVersions.InvokeAsync())
.Apply(v => v.LatestMasterVersion);
var cluster = new Cluster("helloworld", new ClusterArgs
{
InitialNodeCount = 2,
MinMasterVersion = masterVersion,
NodeVersion = masterVersion,
NodeConfig = new ClusterNodeConfigArgs
{
MachineType = "n1-standard-1",
OauthScopes =
{
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring"
}
}
});
this.KubeConfig = Output.Tuple(cluster.Name, cluster.Endpoint, cluster.MasterAuth).Apply(
t => GetKubeconfig(t.Item1, t.Item2, t.Item3)
);
this.ClusterName = cluster.Name;
}
[Output] public Output<string> ClusterName { get; set; }
[Output] public Output<string> KubeConfig { get; set; }
private static string GetKubeconfig(string clusterName, string clusterEndpoint, ClusterMasterAuth clusterMasterAuth)
{
var context = $"{Pulumi.Gcp.Config.Project}_{Pulumi.Gcp.Config.Zone}_{clusterName}";
return $@"apiVersion: v1
clusters:
- cluster:
certificate-authority-data: {clusterMasterAuth.ClusterCaCertificate}
server: https://{clusterEndpoint}
name: {context}
contexts:
- context:
cluster: {context}
user: {context}
name: {context}
current-context: {context}
kind: Config
preferences: {{}}
users:
- name: {context}
user:
auth-provider:
config:
cmd-args: config config-helper --format=json
cmd-path: gcloud
expiry-key: '{{.credential.token_expiry}}'
token-key: '{{.credential.access_token}}'
name: gcp";
}
}
go: |
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/container"
"github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes"
appsv1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/apps/v1"
corev1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/core/v1"
metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
engineVersions, err := container.GetEngineVersions(ctx, &container.GetEngineVersionsArgs{})
if err != nil {
return err
}
masterVersion := engineVersions.LatestMasterVersion
cluster, err := container.NewCluster(ctx, "demo-cluster", &container.ClusterArgs{
InitialNodeCount: pulumi.Int(2),
MinMasterVersion: pulumi.String(masterVersion),
NodeVersion: pulumi.String(masterVersion),
NodeConfig: &container.ClusterNodeConfigArgs{
MachineType: pulumi.String("n1-standard-1"),
OauthScopes: pulumi.StringArray{
pulumi.String("https://www.googleapis.com/auth/compute"),
pulumi.String("https://www.googleapis.com/auth/devstorage.read_only"),
pulumi.String("https://www.googleapis.com/auth/logging.write"),
pulumi.String("https://www.googleapis.com/auth/monitoring"),
},
},
})
if err != nil {
return err
}
ctx.Export("kubeconfig", generateKubeconfig(cluster.Endpoint, cluster.Name, cluster.MasterAuth))
k8sProvider, err := kubernetes.NewProvider(ctx, "k8sprovider", &kubernetes.ProviderArgs{
Kubeconfig: generateKubeconfig(cluster.Endpoint, cluster.Name, cluster.MasterAuth),
}, pulumi.DependsOn([]pulumi.Resource{cluster}))
if err != nil {
return err
}
namespace, err := corev1.NewNamespace(ctx, "app-ns", &corev1.NamespaceArgs{
Metadata: &metav1.ObjectMetaArgs{
Name: pulumi.String("demo-ns"),
},
}, pulumi.Provider(k8sProvider))
if err != nil {
return err
}
appLabels := pulumi.StringMap{
"app": pulumi.String("demo-app"),
}
_, err = appsv1.NewDeployment(ctx, "app-dep", &appsv1.DeploymentArgs{
Metadata: &metav1.ObjectMetaArgs{
Namespace: namespace.Metadata.Elem().Name(),
},
Spec: appsv1.DeploymentSpecArgs{
Selector: &metav1.LabelSelectorArgs{
MatchLabels: appLabels,
},
Replicas: pulumi.Int(3),
Template: &corev1.PodTemplateSpecArgs{
Metadata: &metav1.ObjectMetaArgs{
Labels: appLabels,
},
Spec: &corev1.PodSpecArgs{
Containers: corev1.ContainerArray{
corev1.ContainerArgs{
Name: pulumi.String("demo-app"),
Image: pulumi.String("jocatalin/kubernetes-bootcamp:v2"),
}},
},
},
},
}, pulumi.Provider(k8sProvider))
if err != nil {
return err
}
service, err := corev1.NewService(ctx, "app-service", &corev1.ServiceArgs{
Metadata: &metav1.ObjectMetaArgs{
Namespace: namespace.Metadata.Elem().Name(),
Labels: appLabels,
},
Spec: &corev1.ServiceSpecArgs{
Ports: corev1.ServicePortArray{
corev1.ServicePortArgs{
Port: pulumi.Int(80),
TargetPort: pulumi.Int(8080),
},
},
Selector: appLabels,
Type: pulumi.String("LoadBalancer"),
},
}, pulumi.Provider(k8sProvider))
if err != nil {
return err
}
ctx.Export("url", service.Status.ApplyT(func(status *corev1.ServiceStatus) *string {
ingress := status.LoadBalancer.Ingress[0]
if ingress.Hostname != nil {
return ingress.Hostname
}
return ingress.Ip
}))
return nil
})
}
func generateKubeconfig(clusterEndpoint pulumi.StringOutput, clusterName pulumi.StringOutput,
clusterMasterAuth container.ClusterMasterAuthOutput) pulumi.StringOutput {
context := pulumi.Sprintf("demo_%s", clusterName)
return pulumi.Sprintf(`apiVersion: v1
clusters:
- cluster:
certificate-authority-data: %s
server: https://%s
name: %s
contexts:
- context:
cluster: %s
user: %s
name: %s
current-context: %s
kind: Config
preferences: {}
users:
- name: %s
user:
auth-provider:
config:
cmd-args: config config-helper --format=json
cmd-path: gcloud
expiry-key: '{.credential.token_expiry}'
token-key: '{.credential.access_token}'
name: gcp`,
clusterMasterAuth.ClusterCaCertificate().Elem(),
clusterEndpoint, context, context, context, context, context, context)
}
py: |
from pulumi import Config, export, get_project, get_stack, Output, ResourceOptions
from pulumi_gcp.config import project, zone
from pulumi_gcp.container import Cluster, ClusterNodeConfigArgs
from pulumi_kubernetes import Provider
from pulumi_kubernetes.apps.v1 import Deployment, DeploymentSpecArgs
from pulumi_kubernetes.core.v1 import ContainerArgs, PodSpecArgs, PodTemplateSpecArgs, Service, ServicePortArgs, ServiceSpecArgs
from pulumi_kubernetes.meta.v1 import LabelSelectorArgs, ObjectMetaArgs
from pulumi_random import RandomPassword
# Read in some configurable settings for our cluster:
config = Config(None)
# nodeCount is the number of cluster nodes to provision. Defaults to 3 if unspecified.
NODE_COUNT = config.get_int('node_count') or 3
# nodeMachineType is the machine type to use for cluster nodes. Defaults to n1-standard-1 if unspecified.
# See https://cloud.google.com/compute/docs/machine-types for more details on available machine types.
NODE_MACHINE_TYPE = config.get('node_machine_type') or 'n1-standard-1'
# username is the admin username for the cluster.
USERNAME = config.get('username') or 'admin'
# password is the password for the admin user in the cluster.
PASSWORD = config.get_secret('password') or RandomPassword("password", length=20, special=True).result
# master version of GKE engine
MASTER_VERSION = config.get('master_version')
# Now, actually create the GKE cluster.
k8s_cluster = Cluster('gke-cluster',
initial_node_count=NODE_COUNT,
node_version=MASTER_VERSION,
min_master_version=MASTER_VERSION,
node_config=ClusterNodeConfigArgs(
machine_type=NODE_MACHINE_TYPE,
oauth_scopes=[
'https://www.googleapis.com/auth/compute',
'https://www.googleapis.com/auth/devstorage.read_only',
'https://www.googleapis.com/auth/logging.write',
'https://www.googleapis.com/auth/monitoring'
],
),
)
# Manufacture a GKE-style Kubeconfig. Note that this is slightly "different" because of the way GKE requires
# gcloud to be in the picture for cluster authentication (rather than using the client cert/key directly).
k8s_info = Output.all(k8s_cluster.name, k8s_cluster.endpoint, k8s_cluster.master_auth)
k8s_config = k8s_info.apply(
lambda info: """apiVersion: v1
clusters:
- cluster:
certificate-authority-data: {0}
server: https://{1}
name: {2}
contexts:
- context:
cluster: {2}
user: {2}
name: {2}
current-context: {2}
kind: Config
preferences: {{}}
users:
- name: {2}
user:
auth-provider:
config:
cmd-args: config config-helper --format=json
cmd-path: gcloud
expiry-key: '{{.credential.token_expiry}}'
token-key: '{{.credential.access_token}}'
name: gcp
""".format(info[2]['cluster_ca_certificate'], info[1], '{0}_{1}_{2}'.format(project, zone, info[0])))
# Make a Kubernetes provider instance that uses our cluster from above.
k8s_provider = Provider('gke_k8s', kubeconfig=k8s_config)
# Create a canary deployment to test that this cluster works.
labels = { 'app': 'canary-{0}-{1}'.format(get_project(), get_stack()) }
canary = Deployment('canary',
spec=DeploymentSpecArgs(
selector=LabelSelectorArgs(match_labels=labels),
replicas=1,
template=PodTemplateSpecArgs(
metadata=ObjectMetaArgs(labels=labels),
spec=PodSpecArgs(containers=[ContainerArgs(name='nginx', image='nginx')]),
),
), opts=ResourceOptions(provider=k8s_provider)
)
ingress = Service('ingress',
spec=ServiceSpecArgs(
type='LoadBalancer',
selector=labels,
ports=[ServicePortArgs(port=80)],
), opts=ResourceOptions(provider=k8s_provider)
)
# Finally, export the kubeconfig so that the client can easily access the cluster.
export('kubeconfig', k8s_config)
# Export the k8s ingress IP to access the canary deployment
export('ingress_ip', ingress.status.apply(lambda status: status.load_balancer.ingress[0].ip))
ts: |
import * as gcp from "@pulumi/gcp";
import * as k8s from "@pulumi/kubernetes";
import * as pulumi from "@pulumi/pulumi";
const name = "helloworld";
const config = new pulumi.Config();
export const masterVersion = config.get("masterVersion") ||
gcp.container.getEngineVersions().then(it => it.latestMasterVersion);
// Create a GKE cluster
const cluster = new gcp.container.Cluster(name, {
// We can't create a cluster with no node pool defined, but we want to only use
// separately managed node pools. So we create the smallest possible default
// node pool and immediately delete it.
initialNodeCount: 1,
removeDefaultNodePool: true,
minMasterVersion: masterVersion,
});
const nodePool = new gcp.container.NodePool(`primary-node-pool`, {
cluster: cluster.name,
initialNodeCount: 2,
location: cluster.location,
nodeConfig: {
preemptible: true,
machineType: "n1-standard-1",
oauthScopes: [
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring",
],
},
version: masterVersion,
management: {
autoRepair: true,
},
}, {
dependsOn: [cluster],
});
// Export the Cluster name
export const clusterName = cluster.name;
// Manufacture a GKE-style kubeconfig. Note that this is slightly "different"
// because of the way GKE requires gcloud to be in the picture for cluster
// authentication (rather than using the client cert/key directly).
export const kubeconfig = pulumi.
all([ cluster.name, cluster.endpoint, cluster.masterAuth ]).
apply(([ name, endpoint, masterAuth ]) => {
const context = `${gcp.config.project}_${gcp.config.zone}_${name}`;
return `apiVersion: v1
clusters:
- cluster:
certificate-authority-data: ${masterAuth.clusterCaCertificate}
server: https://${endpoint}
name: ${context}
contexts:
- context:
cluster: ${context}
user: ${context}
name: ${context}
current-context: ${context}
kind: Config
preferences: {}
users:
- name: ${context}
user:
auth-provider:
config:
cmd-args: config config-helper --format=json
cmd-path: gcloud
expiry-key: '{.credential.token_expiry}'
token-key: '{.credential.access_token}'
name: gcp
`;
});
// Create a Kubernetes provider instance that uses our cluster from above.
const clusterProvider = new k8s.Provider(name, {
kubeconfig: kubeconfig,
}, {
dependsOn: [nodePool],
});
// Create a Kubernetes Namespace
const ns = new k8s.core.v1.Namespace(name, {}, { provider: clusterProvider });
// Export the Namespace name
export const namespaceName = ns.metadata.name;
// Create a NGINX Deployment
const appLabels = { appClass: name };
const deployment = new k8s.apps.v1.Deployment(name,
{
metadata: {
namespace: namespaceName,
labels: appLabels,
},
spec: {
replicas: 1,
selector: { matchLabels: appLabels },
template: {
metadata: {
labels: appLabels,
},
spec: {
containers: [
{
name: name,
image: "nginx:latest",
ports: [{ name: "http", containerPort: 80 }],
},
],
},
},
},
},
{
provider: clusterProvider,
},
);
// Export the Deployment name
export const deploymentName = deployment.metadata.name;
// Create a LoadBalancer Service for the NGINX Deployment
const service = new k8s.core.v1.Service(name,
{
metadata: {
labels: appLabels,
namespace: namespaceName,
},
spec: {
type: "LoadBalancer",
ports: [{ port: 80, targetPort: "http" }],
selector: appLabels,
},
},
{
provider: clusterProvider,
},
);
// Export the Service name and public LoadBalancer endpoint
export const serviceName = service.metadata.name;
export const servicePublicIP = service.status.loadBalancer.ingress[0].ip;
benefits:
title: The benefits of using Pulumi
items:
- title: Tame cloud complexity
icon: code-window
icon_color: salmon
description: |
Deliver infrastructure from 50+ cloud and SaaS providers. Pulumis SDKs provide a complete and consistent interface that offers full access to
clouds and abstracts complexity.
- title: Bring the cloud closer to application development
icon: download-from-cloud
icon_color: violet
description: |
Build reusable cloud infrastructure and infrastructure platforms that empower
developers to build modern cloud applications faster and with less overhead.
- title: Use engineering practices with infrastructure
icon: exchange
icon_color: blue
description: |
Use engineering practices with infrastructure” to: “Replace inefficient, manual infrastructure processes with automation.
Test and deliver infrastructure through CI/CD workflows or automate deployments with code at runtime.
- title: Foster collaboration and innovate faster
icon: lightning
icon_color: yellow
description: |
Unite infrastructure teams, developers, and security teams around shared languages and tools so that everyone can ship products quickly and reliably.
meta_desc: Infrastructure as code on Google Cloud with Pulumi for huge productivity gains and a unified programming model for developers and operators.
contact_us_form:
section_id: contact-us
hubspot_form_id: 3eee19cc-77d0-440a-85d9-8979e775b4e5
headline: Need help with cloud-native infrastructure as code on Google Cloud?
quote:
title: Learn how top engineering teams are using Pulumi's SDK to create, deploy, and manage Google Cloud resources.
name: Josh Imhoff
name_title: Site Reliability Engineer, Cockroach Labs
content: |
We are building a distributed-database-as-a-service product that runs on Kubernetes clusters across
multiple public clouds including Google Cloud, AWS and others. Pulumi's declarative model, the support for real
programming languages, and the uniform workflow on any cloud make our SRE team much more efficient.
GREAT WEBSITE MIGRATION OF 2018 (#1269) * Move content into docs/content * Make navigation and doc generation work Signed-off-by: Christian Nunciato <c@nunciato.org> * Make search work Signed-off-by: Christian Nunciato <c@nunciato.org> * Move docs-specific layouts into layouts/docs Signed-off-by: Christian Nunciato <c@nunciato.org> * Move docs partials into layouts/partials/docs Signed-off-by: Christian Nunciato <c@nunciato.org> * Share a common header and footer Signed-off-by: Christian Nunciato <c@nunciato.org> * Add product & pricing pages, modify main nav Signed-off-by: Christian Nunciato <c@nunciato.org> * Bring images under assets, docs images under assets/images/docs Signed-off-by: Christian Nunciato <c@nunciato.org> * Link to the docs home page, fix image ref Signed-off-by: Christian Nunciato <c@nunciato.org> * Add containers, serverless, kubernetes topics Signed-off-by: Christian Nunciato <c@nunciato.org> * Add careers Signed-off-by: Christian Nunciato <c@nunciato.org> * Add compete, compete -> migrate Signed-off-by: Christian Nunciato <c@nunciato.org> * About, contact Signed-off-by: Christian Nunciato <c@nunciato.org> * Add legal Signed-off-by: Christian Nunciato <c@nunciato.org> * Add product Signed-off-by: Christian Nunciato <c@nunciato.org> * Add partner content Signed-off-by: Christian Nunciato <c@nunciato.org> * Add webinar Signed-off-by: Christian Nunciato <c@nunciato.org> * Add why-pulumi Signed-off-by: Christian Nunciato <c@nunciato.org> * Add GitHub redirect, support Signed-off-by: Christian Nunciato <c@nunciato.org> * Add blog * Add blog - update post frontmatter * Update content/_index.md Co-Authored-By: Justin Van Patten <jvp@justinvp.com> * Remove drafts & redundant fonts, move asset dirs up a level Signed-off-by: Christian Nunciato <c@nunciato.org> * Reconcile blog navigation Signed-off-by: Christian Nunciato <c@nunciato.org> * Migrate some blog content (#1147) * Reconcile www, blog and docs footer items (#1141) Signed-off-by: Christian Nunciato <c@nunciato.org> * Clean up blog layout (#1148) * Migrate more blog posts (#1157) * Replace Bootstrap with TailwindCSS * Add Tailwind * Create a config directory under assets, move PostCSS and Tailwind configs into it * Remove Bootstrap Sass and JS referemce * Refactor the header, base template, and footer to use Tailwind * Pull TOC Sass into its own partial Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor the docs home page Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor docs single, list and section layouts Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor quickstart-clouds partial Signed-off-by: Christian Nunciato <c@nunciato.org> * Reposition config items to fix syntax highlighting Signed-off-by: Christian Nunciato <c@nunciato.org> * Replace syntax CSS theme with Monokai Signed-off-by: Christian Nunciato <c@nunciato.org> * Add a dark blue for links Signed-off-by: Christian Nunciato <c@nunciato.org> * Add the beginnings of Sass color settings Signed-off-by: Christian Nunciato <c@nunciato.org> * Add a Sass file for langchoose Signed-off-by: Christian Nunciato <c@nunciato.org> * Give no-select its own Sass also, since it’s a partial Signed-off-by: Christian Nunciato <c@nunciato.org> * Give docs single and list templates more width for main content Signed-off-by: Christian Nunciato <c@nunciato.org> * Add some padding to the TOC, since we don’t have proper gutters yet Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix button on Quickstart home page Signed-off-by: Christian Nunciato <c@nunciato.org> * TOC styles Signed-off-by: Christian Nunciato <c@nunciato.org> * Quickstart clouds Signed-off-by: Christian Nunciato <c@nunciato.org> * Padding to left and right columns Signed-off-by: Christian Nunciato <c@nunciato.org> * Black for TOC Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor docs/aws to use its own layouts Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix the AWS tech partner image Signed-off-by: Christian Nunciato <c@nunciato.org> * Adjust AWS layouts Signed-off-by: Christian Nunciato <c@nunciato.org> * Move docs-home markup into a layout Signed-off-by: Christian Nunciato <c@nunciato.org> * Format the mini-toc Signed-off-by: Christian Nunciato <c@nunciato.org> * Reduce subhead sizes a bit Signed-off-by: Christian Nunciato <c@nunciato.org> * Remove snowflake styles Signed-off-by: Christian Nunciato <c@nunciato.org> * Extract some Sass partials Signed-off-by: Christian Nunciato <c@nunciato.org> * Define initial purple and blue palettes, use numbered colors instead Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor blog templates Signed-off-by: Christian Nunciato <c@nunciato.org> * Make blog summary a partial, style pagination Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix expanded URLs Signed-off-by: Christian Nunciato <c@nunciato.org> * Rename Documentation to Reference Signed-off-by: Christian Nunciato <c@nunciato.org> * A smattering of minor adjustments Signed-off-by: Christian Nunciato <c@nunciato.org> * Selection state for tags Signed-off-by: Christian Nunciato <c@nunciato.org> * Delete more Bootstrap Signed-off-by: Christian Nunciato <c@nunciato.org> * Comment the banner Signed-off-by: Christian Nunciato <c@nunciato.org> * Restore footer links Signed-off-by: Christian Nunciato <c@nunciato.org> * Legal layout Signed-off-by: Christian Nunciato <c@nunciato.org> * Remove unused layout Signed-off-by: Christian Nunciato <c@nunciato.org> * Refactor careers page Signed-off-by: Christian Nunciato <c@nunciato.org> * Use top-level URLs for legal docs Signed-off-by: Christian Nunciato <c@nunciato.org> * Add RSS for the blog (#1170) * Add RSS for the blog * Cleanup team data (#1195) * Cleanup team data * Add missing newlines at EOF * Blog content as of 6/16 (#1196) * Blog content layout tweaks * Migrated blog content (as of Sun 6/16) * Address PR feedback, replace links to pulumi.io * Add fusion stack Any changes to the `fusion` branch will now be deployed to https://fusion.pulumi.io/. * Fix broken links * Fix broken images in fusion branch (#1207) Deletes unnecessary uses of `BaseURL`. In a small number of cases, where we want to emit an absolute URL that includes the `BaseURL`, use the `absURL` function instead, which is smart about handling missing/extra slashes. * Integrate www content (#1208) Signed-off-by: Christian Nunciato <c@nunciato.org> * Highlight currently selected section tab (#1216) * Remove unused partials (#1215) These are no longer referenced, so they can be removed. Signed-off-by: Christian Nunciato <c@nunciato.org> * Blog content as of 6/24 (#1218) * Port running-containers-in-aws-the-lowdown-ecs-fargate-and-eks * Port building-and-publishing-docker-images-to-a-private-amazon-ecr-repository * Port happy-birthday-to-pulumi-open-source * Commit updates to package-lock.json * Link cleanups and other fixes * Remove 'wip' tag * Restore meta_* fields, tidy up some frontmatter (#1214) Signed-off-by: Christian Nunciato <c@nunciato.org> * Add search (#1217) Signed-off-by: Christian Nunciato <c@nunciato.org> * Hide `.language-prologue-*` by default (#1212) So they all don't initially flash as being visible before all but the selected language are hidden. Port from `_pulumi.scss`. * Limit team members to those with status “active” (#1219) Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix links to datadog provider * Remove top margin from code snippets under lang tabs (#1223) * Update MBR DNA logo (#1222) * Add links to cloud logos (#1221) And use `logo-aws_white.png` for AWS * Remove unnecessary aliases (#1210) Now that we'll be hosting the docs on a new domain, there's no need to maintain these aliases. The old site hosted at https://pulumi.io will have redirects from the old aliases to the new location on the new site. * Pricing page updates (#1224) * Add swooshes to the home, pricing and webinar pages. * Replace “tech” PNGs for GitHub, GitLab, Atlassian and SAML with SVGs, and add an email SVG, in order to align all of their images in the pricing grid. * Add a “See plan details” link above the pricing grid. * Update Font Awesome to version 5.8.1 (to match what's in use on www today) in order to pull in the infinity icons used in the pricing grid. * Align CTA buttons horizontally in adjacent boxes containing content of varying heights. * Fix duplicate links on the home and product pages. Signed-off-by: Christian Nunciato <c@nunciato.org> * Update API docs (#1227) * Update tsdocgen paths * Updated API docs * Fix broken images (#1228) Remove unnecessary `{{ .Site.BaseURL }}` prefix from image URLs. * Fix Hugo build warning about non-relative ref/relref page reference (#1229) * Fix page titles and errant anchors (#1226) * Prevent anchors on the home page * Fix page titles Signed-off-by: Christian Nunciato <c@nunciato.org> * Add a robots.txt file (#1225) This change adds a robots.txt template authorizing seach-engine indexing for all pages of the production site. It assumes that all non-production builds will override the `baseURL` configuration property with something other than `https://pulumi.com/`. Signed-off-by: Christian Nunciato <c@nunciato.org> * Blog content fixes (#1231) * Correct post dates, titles * Revert to previous tags * Unify tags, adjust for display * Replace short, social summaries with longer ones * Use a fixed height for the utility bar (#1232) When the GitHub widget loads asynchronously and pops into view, it causes the whole page to shift downward a few pixels, because the widget is taller than the links beside it. Applying an explicit hight to the utility bar fixes this. Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix TOC expansion for the tour (#1234) We're very likely going to remove the tour and disperse its content elsewhere, but in the meantime, fix the TOC expansion for "Beyond the Basics" items. * Add syntax highlighing to layout templates (#1238) This change adds a partial for highlighting code snippets in layouts. Signed-off-by: Christian Nunciato <c@nunciato.org> * Add home-page video (#1240) Also makes a few slight adjustments to improve mobile layout on the home page. Signed-off-by: Christian Nunciato <c@nunciato.org> * Blog layout and styling improvements (#1237) * Use explicit code blcoks with language * Fix sort order for Author and Tag listings * Make sidebar toggleable on mobile * Resize "poster" image for blog listings * Crop photos to be square * Add posted date, post tags to blog footer * Add recent posts lists to sidebar * Add syntax highlighting to some missed posts * Fix Hugo build warning * Adjust sidebar styling * Cleanup the /docs page (#1239) * Cleanup /docs/aws layouts to match other docs sections * Cleanup /docs pages - Add left nav - Make /docs page look slightly less like a "homepage" - Add top-level "Get Started" and "Reference" headings to left nav * Add `.btn-secondary` and use it in a few places * Remove unnecessary cursor setting (#1245) Should be using the default here. I was debugging and forgot to switch this back before committing. Signed-off-by: Christian Nunciato <c@nunciato.org> * Update the home page video (#1244) This is a slightly shorter version, with typing sections sped up slightly to better respect our visitors’ time. :smile: Signed-off-by: Christian Nunciato <c@nunciato.org> * API doc styling improvements (#1247) * Update API doc styling for Python Bring back the styles used for our Python API docs, convert to use Tailwind, and make further tweaks to make it look even better. For example, all definitions now look like code blocks and indentation and spacing is used to improve the hierarchy of the content. * Only emit the <h1>.Title</h1> if there is a .Title The generated Python API docs don't currently include front matter and therefore do not have a title. We should fix the Python docs gen to do that, but in the meantime, only emit `<h1>.Title</h1>` if the page has a `.Title`, to avoid an unnecessary gap at the top of the page. * Update _pygments.scss to select .highlight instead of .chroma The syntax highlighted code generated by Hugo looks like: ``` <div class="highlight"> <pre class="chroma"> <code class="language-foo"> ... </code> </pre> </div> ``` And our styles looks like: ``` .chroma .k { ... } .chroma .kc { ... } ... ``` This works good, but our generated Python docs, which uses Pygments to do the syntax highlighting, doesn't use `.chroma`, so it doesn't get any syntax highlighting currently, even though all the Pygments classes are there. This is true for our Node.js docs as well, although, based on how we generate the code for that currently, we could relatively easily update the templates to include a `.chroma` class. In all cases, the code that we want highlighted will have a `.highlight` class surrounding it, so just update our styles to select `.highlight` instead of `.chroma`. ``` .highlight .k { ... } .highlight .kc { ... } ... ``` * Update API doc styling for Node.js * Various mobile adjustments and cleanup (#1250) * Pull the hero and section nav into Tailwind "components" and apply them. * Adjust home-page video dimensions accordingly. * Add mobile x-padding to sections that hadn't gotten it yet. * Add an anchor exclusion to the head for the About page. * Fix mobile layout for the Support page. * Fix centering and item distribution on the About page. * Additional minor mobile-related adjustments as encountered. Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix bug in lang chooser (#1249) If I've previously viewed a page in our docs with the language tabs, such as the Get Started guide, and I click the Python tab, that language choice will be persisted to a cookie. If I then visit our Node.js API docs, the lang chooser will see the saved value of "Python" and try to select that tab, hiding all other language snippets. But our Node.js API docs only contain JavaScript and TypeScript snippets, so the end result is that all snippets are hidden and no tab is selected. This change fixes that. If the value in the cookie does not exist in any of the tabs on the page, fallback to the default (JavaScript), otherwise fallback to the first tab that is available on the page. * More small fixes (#1254) * Make the header more responsive Adds padding to medium and above, and adjusts font size and spacing at medium width in order to accommodate the number of items we’re displaying currently. Also uses the full Pulumi logo, since we have room for that now, and adds a little color to the hamburger. Signed-off-by: Christian Nunciato <c@nunciato.org> * Bottom-align the image on the whitepaper layout Also removes the `header` selector from `_hero.scss` in order to reduce the specificity of the rule, allowing it to be overidden more easily with other Tailwind classnames. Signed-off-by: Christian Nunciato <c@nunciato.org> * Add team@pulumi link to the footer Signed-off-by: Christian Nunciato <c@nunciato.org> * Restore the newsroom and investors sections Somehow these got dropped! :scream: Signed-off-by: Christian Nunciato <c@nunciato.org> * Add hero background glows (#1257) Also deletes unused templates. Signed-off-by: Christian Nunciato <c@nunciato.org> * Hide scrollbars if not needed (#1256) * Improve Pricing page responsiveness, fix a few other small things (#1259) * Fix section link on the Why Pulumi page Signed-off-by: Christian Nunciato <c@nunciato.org> * Capitalize Kubernetes in copy Signed-off-by: Christian Nunciato <c@nunciato.org> * Adjust image sizes on Whitepaper page Properly size them on both mobile and desktop. Signed-off-by: Christian Nunciato <c@nunciato.org> * Fix paging on mobile Decrease padding to prevent overflow. Signed-off-by: Christian Nunciato <c@nunciato.org> * Improve Pricing page layout Signed-off-by: Christian Nunciato <c@nunciato.org> * Replace home page video with carousel (#1260) Signed-off-by: Christian Nunciato <c@nunciato.org> * Change Segment module to WWW (#1265) * Hook up new www.pulumi.com/staging stack to CI/CD (#1262) * Move older 'pulumi.io' stacks to infrastructure-old * Add new 'www.pulumi.com' infrastructure folder * Scripts to hook up to CI/CD * Switch back to using generic Travis worker * Add alias to CDN for staging.pulumi.io * Remove alias to staging.pulumi.io * Do not use named profiles for deployments There's an issue today where named profiles which use `credential_source=Environment` don't actually behave correctly with the assume-role tool. Instead of actually assuming the role, it just uses the credentials in the environment, which is not exactly what you want. For now, explicitly set the ARN we want to assume, instead of indirecting across a named profile. * Remove CloudFront alias entirely * Add hover menu (#1266) Signed-off-by: Christian Nunciato <c@nunciato.org> * Hook up new www.pulumi.com/production stack to CI/CD (#1267) * Hook up new www.pulumi.com/production stack to CI/CD * Correct Makefile syntax * Migrate blog posts as of 7/2 (#1268) * Fix Makefile syntax * Fix spelling error ::sigh::
2019-07-02 16:30:33 -07:00
---