Automated build of concourse-ssh-deploy. A concourse resource for running docker images remotely.
1M+
aecepoglu/concourse-ssh-deploy on Docker Hub
A Concourse resource that you can use to deploy docker images in ssh'ed hosts
private_key: ssh key required for logindoesn't do anything
doesn't do anything
user: REQUIRED ssh usernamehost: REQUIRED ssh hostfrom_image: REQUIRED docker image to deployport_mapping: OPTIONAL port mapping for docker image. Accepts the same format as docker run. For example: `["80", "3001:4003"]volume_mapping: OPTIONAL volume/mount mapping for docker image. Accepts the same format as docker run. For example: `["/host/directory:/container/directory"]build_url_for_port: OPTIONAL if given a port number, then the url in the form of "http://{host}:{build_url_for_port}" is written inside the file info/url. The example below should help explain.env: OPTIONAL environment variables to set. For example: {PORT: 3000, MONGO_URL: mongodb://192.168.2.101}The pipeline below gets code from git repository, builds a docker image from it and pushes it to a registry, and then deploys that image so it's running at 192.168.2.100:3003
resource_types:
- name: ssh-deploy-target
type: docker-image
source:
repository: aecepoglu/concourse-ssh-deploy
resources:
- name: ssh-target
type: ssh-deploy-target
source:
private_key: {{private_key}}
jobs:
- name: build-and-deploy
plan:
- put: ssh-target
params:
user: user123
host: 192.168.2.100
port_mapping: ["80", "3001:3000"]
from_image: dockercloud/hello-world
build_url_for_port: 80
- task: "view build info"
config:
platform: linux
image_resource:
type: docker-image
source: {repository: busybox, tag: "1.25"}
inputs:
- name: ssh-target
run:
path: sh
args:
- -exc
- |
ls ssh-target
ls ssh-target/info
cat ssh-target/info/url
The output of the task view build info is:
+ ls ssh-target
info
+ ls ssh-target/info
url
+ cat ssh-target/info/url
http://192.168.2.100:32781
Content type
Image
Digest
Size
88 MB
Last updated
over 9 years ago
docker pull aecepoglu/concourse-ssh-deploy