cmd

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SiteName      = "site-name"
	SiteShorthand = "n"
)

These constants define a parameter which allows control of the name of the site that is to be created.

View Source
const (
	ResoureGroupName       = "resource-group"
	ResourceGroupShorthand = "g"
	ResourceGroupDefault   = "<site name>"
)

These constants define a parameter which gives control over the Azure Resource Group that should be used to hold the created assets.

View Source
const (
	LocationName        = "location"
	LocationShorthand   = "l"
	LocationDefault     = "centralus"
	LocationDefaultText = "<resource group location>, or " + LocationDefault
)

These constants define a parameter which allows control over the Azure Region that should be used when creating a resource group. If the specified resource group already exists, its location is used and this parameter is discarded.

View Source
const (
	DatabaseTypeName  = "db-type"
	DatabaseShorthand = "d"
)

These constants define a parameter that allows control of the type of database to be provisioned. This is largely an escape hatch to use if Buffalo-Azure is incorrectly identifying the flavor of database to use after reading your application.

Supported flavors:

  • None
  • Postgresql
  • MySQL
View Source
const (
	DatabaseAdminName    = "db-admin"
	DatabaseAdminDefault = "buffaloAdmin"
)

These constants defeine a parameter which controls the password of the

View Source
const (
	DatabasePasswordName      = "db-password"
	DatabasePasswordShorthand = "w"
	DatabasePasswordDefault   = "<randomly generated>"

	DatabasePasswordEnvVar = "BUFFALO_AZURE_DATABASE_PASSWORD"
)

These constants define a parameter which controls the password of the database provisioned. For marginal security, it is randomly generated each time `buffalo azure provision` is run. It will be visibile in the "connection strings" of your App Service.

View Source
const (
	EnvironmentName      = "az-env"
	EnvironmentShorthand = "a"
	EnvironmentDefault   = "AzurePublicCloud"
)

These constants define a parameter which allows control over the particular Azure cloud which should be used for deployment. Some examples of Azure environments by name include: - AzurePublicCloud (most popular) - AzureChinaCloud - AzureGermanCloud - AzureUSGovernmentCloud

View Source
const (
	// ImageName is the full parameter name of the argument that controls which container image will be used
	// when the Web App for Containers is provisioned.
	ImageName = "image"

	// ImageShorthand is the abbreviated means of using ImageName.
	ImageShorthand = "i"

	// ImageDefault is the container image that will be deployed if you didn't specify one.
	ImageDefault = "appsvc/sample-hello-world:latest"
)

These constants define a parameter which will control which container image is used to

View Source
const (
	// TemplateName is the full parameter name of the argument providing a URL where the ARM template to bue used can
	// be found.
	TemplateName = "rm-template"

	// TemplateShorthand is the abbreviated means of using TemplateName.
	TemplateShorthand = "t"

	// TemplateDefault is the name of the Template to use if no value was provided.
	TemplateDefault = "./azuredeploy.json"

	// TemplateDefaultLink defines the link that will be used if no local rm-template is found, and a link wasn't
	// provided.
	TemplateDefaultLink = "https://aka.ms/buffalo-template"
)

These constants define a parameter that allows control of the Azure Resource Management (ARM) template that should be used to provision infrastructure. This tool is not designed to deploy arbitrary ARM templates, rather this parameter is intended to give you the flexibility to lock to a known version of the gobuffalo quick start template, or tweak that template a little for your own usage.

To prevent live-site incidents, a local copy of the default template is stored in this executable. If this parameter is NOT specified, this program will attempt to acquire the remote version of the default-template. Should that fail, the locally cached copy will be used. If the parameter is specified, this program will attempt to acquire the remote version. If that operation fails, the program does NOT use the cached template, and terminates with a non-zero exit status.

View Source
const (
	TemplateParametersName      = "rm-template-params"
	TemplateParametersShorthand = "p"
	TemplateParametersDefault   = "./azuredeploy.parameters.json"
)

These constants define a parameter which allows control of the ARM template parameters that should be used during deployment.

View Source
const (
	SubscriptionName      = "subscription-id"
	SubscriptionShorthand = "s"
)

These constants define a parameter that Azure subscription to own the resources created.

This can also be specified with the environment variable AZURE_SUBSCRIPTION_ID or AZ_SUBSCRIPTION_ID.

View Source
const (
	ProfileName      = "buffalo-env"
	ProfileShorthand = "b"
)

These constants define a parameter which will control the profile being used for the sake of connections.

View Source
const (
	VerboseName      = "verbose"
	VerboseShortname = "v"
)

These constants define a parameter which toggles whether or not status information will be printed as this program executes.

View Source
const (
	SkipTemplateCacheName      = "skip-template-cache"
	SkipTemplateCacheShorthand = "z"
)

These constants define a parameter which toggles whether or not to save the template used for deployment to disk.

View Source
const (
	SkipParameterCacheName      = "skip-parameters-cache"
	SkipParameterCacheShorthand = "y"
)

These constants define a parameter which toggles whether or not to save the parameters used for deployment to disk.

View Source
const (
	SkipDeploymentName      = "skip-deployment"
	SkipDeploymentShorthand = "x"
)

These constants define a parameter which toggles whether or not a deployment is actually started.

View Source
const (
	DockerRegistryPasswordName = "docker-registry-password"

	DockerRegistryPasswordEnvVar = "BUFFALO_AZURE_DOCKER_PASSWORD"
)

These constants define a parameter which allows the password to be set for Docker authentication.

View Source
const (
	DockerAccessPublic  = "public"
	DockerAccessPrivate = "private"
)

All (currently) possible value of DockerAccess

View Source
const (
	DockerRegistryAccessName    = "docker-registry-access"
	DockerRegistryAccessDefault = DockerAccessPublic
)

These constants define a parameter which informs buffalo-azure whether the registry is public or private.

View Source
const (
	ClientIDName = "client-id"
)

These constants define a parameter which allows specification of a Service Principal for authentication. This should always be used in tandem with `--client-secret`.

This can also be specified with the environment variable AZURE_CLIENT_ID or AZ_CLIENT_ID.

To learn more about getting started with Service Principals you can look here: - Using the Azure CLI 2.0: [https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?toc=%2Fazure%2Fazure-resource-manager%2Ftoc.json&view=azure-cli-latest) - Using Azure PowerShell: [https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-authenticate-service-principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-authenticate-service-principal?view=azure-cli-latest) - Using the Azure Portal: [https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal?view=azure-cli-latest)

View Source
const (
	ClientSecretName = "client-secret"
)

These constants define a parameter which allows specification of a Service Principal for authentication. This should always be used in tandem with `--client-id`.

This can also be specified with the environment variable AZURE_CLIENT_SECRET or AZ_CLIENT_SECRET.

View Source
const (
	DatabaseNameName = "db-name"
)

These constants define a parameter which gives control of the name of the database to be connected to by the Buffalo application.

View Source
const (
	DeviceAuthName = "use-device-auth"
)

These constants define a parameter which forces this program to ignore any ambient Azure settings available as environment variables, and instead forces us to use Device Auth instead.

View Source
const (
	DockerRegistryURLName = "docker-registry-url"
)

These constants define a parameter which controls the Docker registry that will be searched for the image provided.

View Source
const (
	DockerRegistryUsernameName = "docker-registry-username"
)

These constants define a parameter which allows the username to be set for Docker authentication.

View Source
const (
	TenantIDName = "tenant-id"
)

These constants define a parameter which provides the organization that should be used during authentication. Providing the tenant-id explicitly can help speed up execution, but by default this program will traverse all tenants available to the authenticated identity (service principal or user), and find the one containing the subscription provided. This traversal may involve several HTTP requests, and is therefore somewhat latent.

This can also be specified with the environment variable AZURE_TENANT_ID or AZ_TENANT_ID.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type DeploymentParameter added in v0.1.0

type DeploymentParameter struct {
	Value interface{} `json:"value,omitempty"`
}

DeploymentParameter is an individual entry in the parameter list.

type DeploymentParameters added in v0.1.0

type DeploymentParameters struct {
	Schema         string                         `json:"$schema"`
	ContentVersion string                         `json:"contentVersion"`
	Parameters     map[string]DeploymentParameter `json:"parameters"`
}

DeploymentParameters enables easy marshaling of ARM Template deployment parameters.

func NewDeploymentParameters added in v0.1.0

func NewDeploymentParameters() *DeploymentParameters

NewDeploymentParameters creates a new instance of DeploymentParameters with reasonable defaults but no parameters.

type DockerAccess added in v0.1.5

type DockerAccess string

DockerAccess is an enum that contains either "private" or "public"

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL