dcoslogin

package module
v0.0.0-...-04ad98d Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2017 License: MIT Imports: 14 Imported by: 1

README

dcos-login CircleCI

Automates unattended login for the DC/OS Community Edition

Installation

If you just want the latest version, run go get -u github.com/Originate/dcos-login/cmd/dcos-login

Otherwise (or if you don't have Go installed) you'll find binaries for your platform on the release page.

Usage

usage: dcos-login --cluster-url=CLUSTER-URL --username=USERNAME --password=PASSWORD [<flags>]

Flags:
  -h, --help                     Show context-sensitive help (also try --help-long and --help-man).
      --cluster-url=CLUSTER-URL  URL of the DC/OS master(s) (e.g https://example.com)
  -u, --username=USERNAME        Github username used for logging in
  -p, --password=PASSWORD        Github password used for logging in
  -k, --insecure                 Set this when targeting a cluster with a self-signed certificate
      --debug                    Enable debugging mode. This *WILL* print credentials.
      --version                  Show application version.

Additionally, the following environment variables can be used:

  • $CLUSTER_URL for --cluster-url
  • $GH_USERNAME for --username
  • $GH_PASSWORD for --password

You can authenticate the DC/OS CLI using:

export CLUSTER_URL="https://my.dcos.cluster.com"
export GH_USERNAME="myorg-ci"
export GH_PASSWORD="secret"

dcos config set core.dcos_acs_token "$(dcos-login)"

If your configuration file for the CLI is in a non-standard location (ie. several clusters), you can override using the following:

export DCOS_CONFIG="path/to/dcos.toml"

Documentation

Overview

Package dcoslogin provides a way to login to a Community Edition DC/OS cluster unattended

Index

Constants

This section is empty.

Variables

View Source
var Debug = false

Debug can be set to true for (very) verbose output, helpful for troubleshooting OAuth issues

Functions

func Login

func Login(o *Options) error

Login simulates a user loging in to a Community Edition DC/OS cluster using Github credentials

Types

type Options

type Options struct {
	ClusterURL *string

	Username *string
	Password *string

	AllowInsecureTLS *bool
}

Options has the parameters needed to login to DC/OS

Directories

Path Synopsis
cmd
dcos-login command

Jump to

Keyboard shortcuts

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