Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the gcloud mixin #499

Merged
merged 1 commit into from
Aug 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ defaultContentLanguage = "en"
weight = 203
url = "/mixins/kubernetes"
parent = "mixins"
[[menu.main]]
name = "gcloud"
identifier = "gcloud-mixin"
weight = 204
url = "/mixins/gcloud"
parent = "mixins"
[[menu.main]]
name = "helm"
identifier = "helm-mixin"
Expand Down
1 change: 1 addition & 0 deletions docs/content/mixins/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Mixins make Porter special, find them, use them, [create your own](/mixin-dev-gu

* [exec](/mixins/exec)
* [kubernetes](/mixins/kubernetes)
* [gcloud](/mixins/gcloud)
* [helm](/mixins/helm)
* [aws](/mixins/aws)
* [azure](/mixins/azure)
Expand Down
87 changes: 87 additions & 0 deletions docs/content/mixins/gcloud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
title: gcloud mixin
description: Using the gcloud mixin
---

Run a command using the [gcloud CLI](https://cloud.google.com/sdk/gcloud/reference/).

Source: https://github.com/deislabs/porter-gcloud

### Install or Upgrade
```
porter mixin install gcloud --feed-url https://cdn.deislabs.io/porter/atom.xml
```

## Mixin Syntax

See the [gcloud CLI Command Reference](https://cloud.google.com/sdk/gcloud/reference/) for the supported commands

```yaml
gcloud:
description: "Description of the command"
groups: GROUP
command: COMMAND
arguments:
- arg1
- arg2
flags:
FLAGNAME: FLAGVALUE
REPEATED_FLAG:
- FLAGVALUE1
- FLAGVALUE2
```

```yaml
gcloud:
description: "Description of the command"
groups:
- GROUP 1
- GROUP 2
command: COMMAND
arguments:
- arg1
- arg2
flags:
FLAGNAME: FLAGVALUE
REPEATED_FLAG:
- FLAGVALUE1
- FLAGVALUE2
```

## Examples

The [Compute Example](https://github.com/deislabs/porter-gcloud/tree/master/examples/compute) provides a full working bundle demonstrating how to use this mixin.

### Authenticate

```yaml
gcloud:
description: "Authenticate"
groups:
- auth
command: activate-service-account
flags:
key-file: gcloud.json
```

### Provision a VM

```yaml
gcloud:
description: "Create VM"
groups:
- compute
- instances
command: create
arguments:
- porter-test
flags:
project: porterci
zone: us-central1-a
machine-type: f1-micro
image: debian-9-stretch-v20190729
image-project: debian-cloud
boot-disk-size: 10GB
boot-disk-type: pd-standard
boot-disk-device-name: porter-test
```