Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #555 from jdeathe/centos-6-develop
Browse files Browse the repository at this point in the history
Release changes for 1.8.3
  • Loading branch information
jdeathe authored Jan 12, 2018
2 parents 2c7ea4e + 1589adb commit 5d5ca5d
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 19 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.git
.gitignore
dist
test
LICENSE
README-short.txt
*.md
!README.md
**/*.mk
**/Makefile
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

Summary of release changes for Version 1 - CentOS-6

### 1.8.3 - 2018-01-12

- Fixes image build failure caused by error installing supervisor via easy_install.
- Adds a `.dockerignore` file.
- Deprecates use of the fleet `--manager` option in the `scmi` installer.

### 1.8.2 - 2017-09-13

- Updates [supervisor](http://supervisord.org/changes.html) to version 3.3.3.
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ RUN rpm --rebuilddb \
# supervisord to be easily inspected with "docker logs".
# -----------------------------------------------------------------------------
RUN easy_install \
--index-url 'https://pypi.python.org/pypi' \
'supervisor == 3.3.3' \
'supervisor-stdout == 0.1.1' \
&& mkdir -p \
Expand Down Expand Up @@ -164,7 +165,7 @@ ENV SSH_AUTHORIZED_KEYS="" \
# -----------------------------------------------------------------------------
# Set image metadata
# -----------------------------------------------------------------------------
ARG RELEASE_VERSION="1.8.2"
ARG RELEASE_VERSION="1.8.3"
LABEL \
maintainer="James Deathe <[email protected]>" \
install="docker run \
Expand Down
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Includes public key authentication, Automated password generation and supports c

## Overview & links

The latest CentOS-6 / CentOS-7 based releases can be pulled from the `centos-6` / `centos-7` Docker tags respectively. For production use it is recommended to select a specific release tag - the convention is `centos-6-1.8.2` OR `1.8.2` for the [1.8.2](https://github.com/jdeathe/centos-ssh/tree/1.8.2) release tag and `centos-7-2.2.4` OR `2.2.4` for the [2.2.4](https://github.com/jdeathe/centos-ssh/tree/2.2.4) release tag.
The latest CentOS-6 / CentOS-7 based releases can be pulled from the `centos-6` / `centos-7` Docker tags respectively. For production use it is recommended to select a specific release tag - the convention is `centos-6-1.8.3` OR `1.8.3` for the [1.8.3](https://github.com/jdeathe/centos-ssh/tree/1.8.3) release tag and `centos-7-2.3.1` OR `2.3.1` for the [2.3.1](https://github.com/jdeathe/centos-ssh/tree/2.3.1) release tag.

### Tags and respective `Dockerfile` links

- `centos-7`,`centos-7-2.2.4`,`2.2.4` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh/blob/centos-7/Dockerfile)
- `centos-6`,`centos-6-1.8.2`,`1.8.2` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh/blob/centos-6/Dockerfile)
- `centos-7`,`centos-7-2.3.1`,`2.3.1` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh/blob/centos-7/Dockerfile)
- `centos-6`,`centos-6-1.8.3`,`1.8.3` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh/blob/centos-6/Dockerfile)

The Dockerfile can be used to build a base image that is the bases for several other docker images.

Expand Down Expand Up @@ -105,10 +105,10 @@ $ docker run \
--rm \
--privileged \
--volume /:/media/root \
jdeathe/centos-ssh:1.8.2 \
jdeathe/centos-ssh:1.8.3 \
/usr/sbin/scmi install \
--chroot=/media/root \
--tag=1.8.2 \
--tag=1.8.3 \
--name=ssh.pool-1.1.1 \
--setopt="--volume {{NAME}}.config-ssh:/etc/ssh"
```
Expand All @@ -122,10 +122,10 @@ $ docker run \
--rm \
--privileged \
--volume /:/media/root \
jdeathe/centos-ssh:1.8.2 \
jdeathe/centos-ssh:1.8.3 \
/usr/sbin/scmi uninstall \
--chroot=/media/root \
--tag=1.8.2 \
--tag=1.8.3 \
--name=ssh.pool-1.1.1 \
--setopt="--volume {{NAME}}.config-ssh:/etc/ssh"
```
Expand All @@ -139,10 +139,10 @@ $ docker run \
--rm \
--privileged \
--volume /:/media/root \
jdeathe/centos-ssh:1.8.2 \
jdeathe/centos-ssh:1.8.3 \
/usr/sbin/scmi install \
--chroot=/media/root \
--tag=1.8.2 \
--tag=1.8.3 \
--name=ssh.pool-1.1.1 \
--manager=systemd \
--register \
Expand All @@ -153,6 +153,8 @@ $ docker run \

##### SCMI Fleet Support

**_Deprecation Notice:_** The fleet project is no longer maintained. The fleet `--manager` option has been deprecated in `scmi`.

If your docker host has systemd, fleetd (and optionally etcd) installed then `scmi` provides a method to schedule the container to run on the cluster. This provides some additional features for managing a group of instances on a [fleet](https://github.com/coreos/fleet) cluster and has the option to use an etcd backed service registry. To use the fleet method of installation use the `-m` or `--manager` option of `scmi` and to include the optional etcd register companion unit use the `--register` option.

##### SCMI Image Information
Expand All @@ -162,7 +164,7 @@ Since release tags `1.7.2` / `2.1.2` the install template has been added to the
_NOTE:_ A prerequisite of the following examples is that the image has been pulled (or loaded from the release package).

```
$ docker pull jdeathe/centos-ssh:1.8.2
$ docker pull jdeathe/centos-ssh:1.8.3
```

To see detailed information about the image run `scmi` with the `--info` option. To see all available `scmi` options run with the `--help` option.
Expand All @@ -171,7 +173,7 @@ To see detailed information about the image run `scmi` with the `--info` option.
$ eval "sudo -E $(
docker inspect \
-f "{{.ContainerConfig.Labels.install}}" \
jdeathe/centos-ssh:1.8.2
jdeathe/centos-ssh:1.8.3
) --info"
```

Expand All @@ -181,7 +183,7 @@ To perform an installation using the docker name `ssh.pool-1.2.1` simply use the
$ eval "sudo -E $(
docker inspect \
-f "{{.ContainerConfig.Labels.install}}" \
jdeathe/centos-ssh:1.8.2
jdeathe/centos-ssh:1.8.3
) --name=ssh.pool-1.2.1"
```

Expand All @@ -191,7 +193,7 @@ To uninstall use the *same command* that was used to install but with the `unins
$ eval "sudo -E $(
docker inspect \
-f "{{.ContainerConfig.Labels.uninstall}}" \
jdeathe/centos-ssh:1.8.2
jdeathe/centos-ssh:1.8.3
) --name=ssh.pool-1.2.1"
```

Expand All @@ -204,7 +206,7 @@ To see detailed information about the image run `scmi` with the `--info` option.
```
$ sudo -E atomic install \
-n ssh.pool-1.3.1 \
jdeathe/centos-ssh:1.8.2 \
jdeathe/centos-ssh:1.8.3 \
--info
```

Expand All @@ -213,14 +215,14 @@ To perform an installation using the docker name `ssh.pool-1.3.1` simply use the
```
$ sudo -E atomic install \
-n ssh.pool-1.3.1 \
jdeathe/centos-ssh:1.8.2
jdeathe/centos-ssh:1.8.3
```

Alternatively, you could use the `scmi` options `--name` or `-n` for naming the container.

```
$ sudo -E atomic install \
jdeathe/centos-ssh:1.8.2 \
jdeathe/centos-ssh:1.8.3 \
--name ssh.pool-1.3.1
```

Expand All @@ -229,7 +231,7 @@ To uninstall use the *same command* that was used to install but with the `unins
```
$ sudo -E atomic uninstall \
-n ssh.pool-1.3.1 \
jdeathe/centos-ssh:1.8.2
jdeathe/centos-ssh:1.8.3
```

#### Using environment variables
Expand Down
2 changes: 1 addition & 1 deletion src/etc/systemd/system/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Environment="DOCKER_USER=jdeathe"
Environment="DOCKER_IMAGE_NAME=centos-ssh"
Environment="DOCKER_CONTAINER_OPTS="
Environment="DOCKER_IMAGE_PACKAGE_PATH=/var/opt/scmi/packages"
Environment="DOCKER_IMAGE_TAG=1.8.2"
Environment="DOCKER_IMAGE_TAG=1.8.3"
Environment="DOCKER_PORT_MAP_TCP_22=2020"
Environment="SSH_AUTHORIZED_KEYS="
Environment="SSH_AUTOSTART_SSHD=true"
Expand Down
22 changes: 22 additions & 0 deletions src/usr/sbin/scmi
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ function scmi ()
# Run command for selected service manager
case ${SCMI_MANAGER_TYPE} in
fleet)
scmi_print_message "deprecated" \
"The fleet manager is deprecated."
scmi_print_message "deprecated_info" \
"Consider using the docker or systemd --manager option instead."
scmi_fleet_${SCMI_COMMAND}
;;
systemd)
Expand Down Expand Up @@ -1439,6 +1443,7 @@ function scmi_manager_type_command_prerequisites ()
function scmi_print_message ()
{
local COLOUR_NEGATIVE='\033[1;31m'
local COLOUR_NOTICE='\033[1;33m'
local COLOUR_POSITIVE='\033[1;32m'
local COLOUR_RESET='\033[0m'
local CHARACTER_STEP='--->'
Expand All @@ -1451,11 +1456,28 @@ function scmi_print_message ()
# Allow for uncolourised output
if [[ -n ${SCMI_MONOCHROME} ]]; then
COLOUR_NEGATIVE=""
COLOUR_NOTICE=""
COLOUR_POSITIVE=""
COLOUR_RESET=""
fi

case "${TYPE}" in
deprecated)
PREFIX=$(
printf -- \
'%b%s%b ' \
"${COLOUR_NOTICE}" \
"[DEPRECATED]" \
"${COLOUR_RESET}"
)
;;
deprecated_info)
PREFIX=$(
printf -- \
'%s ' \
" "
)
;;
error)
PREFIX=$(
printf -- \
Expand Down

0 comments on commit 5d5ca5d

Please sign in to comment.