GithubHelp home page GithubHelp logo

hyperonecom / docker-machine-driver-hyperone Goto Github PK

View Code? Open in Web Editor NEW
2.0 5.0 0.0 36 KB

HyperOne driver for Docker Machine

License: MIT License

Go 61.21% Dockerfile 4.93% Shell 33.86%
docker docker-machine docker-machine-driver

docker-machine-driver-hyperone's Introduction

docker-machine-driver-hyperone

Build Status Go Report Card

A Docker Machine driver for HyperOne. It can be used provision multiple remote Docker hosts on Virtual Machine.

Requirements

Installation

Go tools

# install latest (git) version of docker-machine-driver-hyperone in your $GOPATH/bin (depends on Golang and docker-machine)
$ go get -u github.com/hyperonecom/docker-machine-driver-hyperone

pre-compiled binaries

You can find sources and pre-compiled binaries on the "Releases" page.

Download the binary (this example downloads the binary for darwin amd64):

$ wget https://github.com/hyperonecom/docker-machine-driver-hyperone/releases/latest/download/docker-machine-driver-hyperone-darwin_amd64.zip
$ unzip docker-machine-driver-hyperone-darwin_amd64.zip

Make it executable and copy the binary in a directory accessible on your $PATH:

$ chmod +x docker-machine-driver-hyperone
$ sudo cp docker-machine-driver-hyperone /usr/local/bin/

Usage

Official documentation for Docker Machine is available on website.

To create a HyperOne Virtual Machine for Docker purposes just run this command:

$ docker-machine create --driver hyperone --hyperone-access-token-secret TOKEN --hyperone-project PROJECT vm
Running pre-create checks...
Creating machine...
(vm) Creating HyperOne VM...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with debian...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env vm

Available options:

Usage: docker-machine create [OPTIONS] [arg...]

Create a machine

Description:
   Run 'docker-machine create --driver name --help' to include the create flags for that driver in the help text.

Options:

   --driver, -d "virtualbox"										Driver to create machine with. [$MACHINE_DRIVER]
   --engine-env [--engine-env option --engine-env option]						Specify environment variables to set in the engine
   --engine-insecure-registry [--engine-insecure-registry option --engine-insecure-registry option]	Specify insecure registries to allow with the created engine
   --engine-install-url "https://get.docker.com"							Custom URL to use for engine installation [$MACHINE_DOCKER_INSTALL_URL]
   --engine-label [--engine-label option --engine-label option]						Specify labels for the created engine
   --engine-opt [--engine-opt option --engine-opt option]						Specify arbitrary flags to include with the created engine in the form flag=value
   --engine-registry-mirror [--engine-registry-mirror option --engine-registry-mirror option]		Specify registry mirrors to use [$ENGINE_REGISTRY_MIRROR]
   --engine-storage-driver 										Specify a storage driver to use with the engine
   --hyperone-access-token-secret 									HyperOne Access Token Secret [$HYPERONE_ACCESS_TOKEN_SECRET]
   --hyperone-disk-name "os-disk"									HyperOne VM OS Disk Name [$HYPERONE_DISK_NAME]
   --hyperone-disk-size "20"										HyperOne VM OS Disk Size [$HYPERONE_DISK_SIZE]
   --hyperone-disk-type "ssd"										HyperOne VM OS Disk Type [$HYPERONE_DISK_TYPE]
   --hyperone-image "debian"										HyperOne Image [$HYPERONE_IMAGE]
   --hyperone-project 											HyperOne Project [$HYPERONE_PROJECT]
   --hyperone-ssh-user "guru"										SSH Username [$HYPERONE_SSH_USER]
   --hyperone-type "a1.micro"										HyperOne VM Type [$HYPERONE_TYPE]
   --swarm												Configure Machine to join a Swarm cluster
   --swarm-addr 											addr to advertise for Swarm (default: detect and use the machine IP)
   --swarm-discovery 											Discovery service to use with Swarm
   --swarm-experimental											Enable Swarm experimental features
   --swarm-host "tcp://0.0.0.0:3376"									ip/socket to listen on for Swarm master
   --swarm-image "swarm:latest"										Specify Docker image to use for Swarm [$MACHINE_SWARM_IMAGE]
   --swarm-join-opt [--swarm-join-opt option --swarm-join-opt option]					Define arbitrary flags for Swarm join
   --swarm-master											Configure Machine to be a Swarm master
   --swarm-opt [--swarm-opt option --swarm-opt option]							Define arbitrary flags for Swarm master
   --swarm-strategy "spread"										Define a default scheduling strategy for Swarm
   --tls-san [--tls-san option --tls-san option]							Support extra SANs for TLS certs

Development

Build from source

If you wish to work on this driver, you will first need Go installed. Make sure Go is properly installed, including setting up a GOPATH.

Clone the repository:

$ git clone [email protected]:hyperonecom/docker-machine-driver-hyperone.git
$ cd docker-machine-driver-hyperone

Run these commands in root of repository to build the plugin binary:

$ go build

After the build is complete, docker-machine-driver-hyperone binary will be created. Put it in the PATH.

Running tests

For details how to run tests read the contents of the .travis.yml file.

docker-machine-driver-hyperone's People

Contributors

ad-m avatar fredericosilva avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-machine-driver-hyperone's Issues

Missing tags

I am asking for the default tagging of a virtual machine with an indication that it was created automatically using the docker-machine, so that the user can more efficiently track what created the virtual machine.

Something like: "software: docker-machine"

Alpine release

The application is sensitive to the Alpine / Debian environment. If you run an Alpine-compiled version in the Debian environment, we get:

$ /usr/local/bin/docker-machine-driver-hyperone 
bash: /usr/local/bin/docker-machine-driver-hyperone: No such file or directory
$ file /usr/local/bin/docker-machine-driver-hyperone 
/usr/local/bin/docker-machine-driver-hyperone: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, not stripped
$ ldd /usr/local/bin/docker-machine-driver-hyperone 
	linux-vdso.so.1 (0x00007fffb13f4000)
	libc.musl-x86_64.so.1 => not found

When compiled in Debian environment & run on Debian-like environment:

$ ldd docker-machine-driver-hyperone 
	linux-vdso.so.1 =>  (0x00007fff9a78e000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f46430e9000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4642d1f000)
	/lib64/ld-linux-x86-64.so.2 (0x00005588f5999000)

The Alpine release is useful when recording guides & quickstarter.

Windows release?

According to the Docker-Machine documentation, it is also available for the Windows platform. See https://docs.docker.com/machine/install-machine/

Docker on the Windows platform is a problematic issue. The use of Docker-Machine seems to be an interesting solution to this problem. @yrself has problems in this area already.

I wanted him to recommend that he become a regular Docker-Machine user. Unfortunately, he is not able to, because there is no version available for the Windows platform. If it changes to Linux, it can run Docker locally and it does not need Docker-Machine at all.

What is required to develop an release for Windows?

Missing user-agent

Please set custom user-agent to allows track usages of docker-machine-driver-hyperone.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.