Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

RedHat provisioning #1090

Merged
merged 39 commits into from
May 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
26432b7
ssh: allocate pty for sudo over ssh for those that have requiretty
ehazlett May 1, 2015
da7ac61
redhat: add redhat provisioning
ehazlett May 1, 2015
18cfe58
redhat: updated docs to explain base operating systems
ehazlett May 1, 2015
9e9c0f1
redhat: update for generic provisioner
ehazlett May 5, 2015
c46e794
redhat: install official docker
ehazlett May 6, 2015
ff2c057
redhat: use docker RPMs for install
ehazlett May 12, 2015
0920a2d
redhat: update RPM path
ehazlett May 12, 2015
0dbfcd5
redhat: remove configure repo as we use our own rpms now
ehazlett May 12, 2015
380aaa2
redhat: update before docker install; use simpler config in proper lo…
ehazlett May 19, 2015
bf7a5f2
redhat: remove aws check; update docs
ehazlett May 19, 2015
f17556b
fedora: provisioner based off of redhat
ehazlett May 12, 2015
b4fa9f1
fedora: remove configure repo
ehazlett May 12, 2015
7998852
fedora: use proper location for config file
ehazlett May 19, 2015
8e9ce9c
fedora: provisioner based off of redhat
ehazlett May 12, 2015
cab167c
fedora: remove configure repo
ehazlett May 12, 2015
065982b
centos: add provisioner
ehazlett May 13, 2015
30ace67
centos: update config path
ehazlett May 19, 2015
5229643
ssh: add -t to force tty allocation
ehazlett May 21, 2015
93b4799
Disable password authentication in SSH command
nathanleclaire May 22, 2015
3385e4e
Nitpick struct fields
nathanleclaire May 22, 2015
b43a72f
ssh: allocate pty for sudo over ssh for those that have requiretty
ehazlett May 1, 2015
fb35d58
redhat: add redhat provisioning
ehazlett May 1, 2015
619fcfb
redhat: updated docs to explain base operating systems
ehazlett May 1, 2015
5707f13
redhat: update for generic provisioner
ehazlett May 5, 2015
3ef6af1
redhat: install official docker
ehazlett May 6, 2015
d993437
redhat: use docker RPMs for install
ehazlett May 12, 2015
86687cf
redhat: update RPM path
ehazlett May 12, 2015
467cb60
redhat: remove configure repo as we use our own rpms now
ehazlett May 12, 2015
d2ca73c
redhat: update before docker install; use simpler config in proper lo…
ehazlett May 19, 2015
9bdd11e
redhat: remove aws check; update docs
ehazlett May 19, 2015
25c3e3a
fedora: provisioner based off of redhat
ehazlett May 12, 2015
c295217
fedora: remove configure repo
ehazlett May 12, 2015
a0e40ab
fedora: use proper location for config file
ehazlett May 19, 2015
a0fe652
fedora: provisioner based off of redhat
ehazlett May 12, 2015
6426ec8
fedora: remove configure repo
ehazlett May 12, 2015
97b6cd1
centos: add provisioner
ehazlett May 13, 2015
0530ab3
centos: update config path
ehazlett May 19, 2015
a8e2cd7
ssh: add -t to force tty allocation
ehazlett May 21, 2015
12de02a
merge nathanleclaire/ehazlett-redhat-provisioning
ehazlett May 26, 2015
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
29 changes: 29 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,8 @@ Options:

The DigitalOcean driver will use `ubuntu-14-04-x64` as the default image.

<<<<<<< HEAD
<<<<<<< HEAD
Environment variables and default values:

| CLI option | Environment variable | Default |
Expand All @@ -1121,6 +1123,21 @@ Environment variables and default values:
| `--digitalocean-ipv6` | `DIGITALOCEAN_IPV6` | `false` |
| `--digitalocean-private-networking` | `DIGITALOCEAN_PRIVATE_NETWORKING` | `false` |
| `--digitalocean-backups` | `DIGITALOCEAN_BACKUPS` | `false` |
=======
#### exoscale
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For alphabetical order, or...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it was listed out of order from one of the rebases.

Create machines on [exoscale](https://www.exoscale.ch/).

Get your API key and API secret key from [API details](https://portal.exoscale.ch/account/api) and pass them to `machine create` with the `--exoscale-api-key` and `--exoscale-api-secret-key` options.

Options:

- `--exoscale-api-key`: Your API key.
- `--exoscale-api-secret-key`: Your API secret key.
- `--exoscale-instance-profile`: Instance profile. Default: `small`.
- `--exoscale-disk-size`: Disk size for the host in GB. Default: `50`.
- `--exoscale-security-group`: Security group. It will be created if it doesn't exist. Default: `docker-machine`.

If a custom security group is provided, you need to ensure that you allow TCP port 2376 in an ingress rule.

#### Generic
Create machines using an existing VM/Host with SSH.
Expand Down Expand Up @@ -1513,6 +1530,8 @@ Options:

The VMware vSphere driver uses the latest boot2docker image.

<<<<<<< HEAD
<<<<<<< HEAD
Environment variables and default values:

| CLI option | Environment variable | Default |
Expand Down Expand Up @@ -1563,6 +1582,16 @@ Environment variables and default values:
| `--exoscale-availability-zone` | `EXOSCALE_AVAILABILITY_ZONE` | `ch-gva-2` |
| `--exoscale-keypair` | `EXOSCALE_KEYPAIR` | - |

=======

## Base Operating Systems
The default base operating system for Machine is Boot2Docker on local providers
(VirtualBox, Fusion, Hyper-V, etc) and the latest Ubuntu LTS supported
by the cloud provider. RedHat Enterprise Linux is also supported. To use
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to clarify that RHEL/CentOS 7+ is supported... Last I checked (which was a long while ago), the packages for RHEL/CentOS 6.x were super-old.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. And actually, it's just RHEL 7+ at the moment (CentOS behaves slightly differently).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I guess because of the RHN stuff? It'd probably be a good idea to get CentOS support in here before too long, but maybe as a follow-up, not necessarily this PR.

RHEL, you will need to select the image accordingly with the provider. For
example, in Amazon EC2, you could use a RedHat 7.1 AMI ("ami-12663b7a") as the
`--amazonec2-ami` option which create an instance using RHEL 7.1 64-bit.

## Release Notes

### Version 0.2.0 (April 16, 2015)
Expand Down
39 changes: 39 additions & 0 deletions libmachine/provision/centos.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package provision

import (
"github.com/docker/machine/drivers"
)

const (
// TODO: eventually the RPM install process will be integrated
// into the get.docker.com install script; for now
// we install via vendored RPMs
dockerCentosRPMPath = "https://docker-mcn.s3.amazonaws.com/public/redhat/rpms/docker-engine-1.6.1-0.0.20150511.171646.git1b47f9f.el7.centos.x86_64.rpm"
)

func init() {
Register("Centos", &RegisteredProvisioner{
New: NewCentosProvisioner,
})
}

func NewCentosProvisioner(d drivers.Driver) Provisioner {
g := GenericProvisioner{
DockerOptionsDir: "/etc/docker",
DaemonOptionsFile: "/etc/systemd/system/docker.service",
OsReleaseId: "centos",
Packages: []string{},
Driver: d,
}
p := &CentosProvisioner{
RedHatProvisioner{
GenericProvisioner: g,
DockerRPMPath: dockerCentosRPMPath,
},
}
return p
}

type CentosProvisioner struct {
RedHatProvisioner
}
7 changes: 4 additions & 3 deletions libmachine/provision/engine_config_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import (
)

type EngineConfigContext struct {
DockerPort int
AuthOptions auth.AuthOptions
EngineOptions engine.EngineOptions
DockerPort int
AuthOptions auth.AuthOptions
EngineOptions engine.EngineOptions
DockerOptionsDir string
}
39 changes: 39 additions & 0 deletions libmachine/provision/fedora.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package provision

import (
"github.com/docker/machine/drivers"
)

const (
// TODO: eventually the RPM install process will be integrated
// into the get.docker.com install script; for now
// we install via vendored RPMs
dockerFedoraRPMPath = "https://docker-mcn.s3.amazonaws.com/public/fedora/rpms/docker-engine-1.6.1-0.0.20150511.171646.git1b47f9f.fc21.x86_64.rpm"
)

func init() {
Register("Fedora", &RegisteredProvisioner{
New: NewFedoraProvisioner,
})
}

func NewFedoraProvisioner(d drivers.Driver) Provisioner {
g := GenericProvisioner{
DockerOptionsDir: "/etc/docker",
DaemonOptionsFile: "/etc/systemd/system/docker.service",
OsReleaseId: "fedora",
Packages: []string{},
Driver: d,
}
p := &FedoraProvisioner{
RedHatProvisioner{
GenericProvisioner: g,
DockerRPMPath: dockerFedoraRPMPath,
},
}
return p
}

type FedoraProvisioner struct {
RedHatProvisioner
}
6 changes: 6 additions & 0 deletions libmachine/provision/pkgaction/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ const (
Restart ServiceAction = iota
Start
Stop
Enable
Disable
DaemonReload
)

var serviceActions = []string{
"restart",
"start",
"stop",
"enable",
"disable",
"daemon-reload",
}

func (s ServiceAction) String() string {
Expand Down
2 changes: 2 additions & 0 deletions libmachine/provision/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/docker/machine/libmachine/engine"
"github.com/docker/machine/libmachine/provision/pkgaction"
"github.com/docker/machine/libmachine/swarm"
"github.com/docker/machine/log"
)

var provisioners = make(map[string]*RegisteredProvisioner)
Expand Down Expand Up @@ -82,6 +83,7 @@ func DetectProvisioner(d drivers.Driver) (Provisioner, error) {
provisioner.SetOsReleaseInfo(osReleaseInfo)

if provisioner.CompatibleWithHost() {
log.Debugf("Compatible OS: %s", osReleaseInfo.Id)
return provisioner, nil
}
}
Expand Down
Loading