Sign inSign up

orangecloudfoundry/orange-cf-bosh-cli

By orangecloudfoundry

Updated about 5 years ago

Bosh cli with usefull tools to deploy Cloud Foundry

Image
3

1M+

orangecloudfoundry/orange-cf-bosh-cli repository overview

Cloud Foundry Docker Bosh cli Docker Automated build

cf-bosh-cli allows to deploy several cli tools through docker image.

Installed tools

Generic tools
Admin tools
Kubernetes tools

The container expose ssh port. Password or key (rsa only) authentication is supported.

How to get it or build it

How to get it

Pull the image from docker hub: docker pull orangecloudfoundry/orange-cf-bosh-cli:<image_tag>

How to build it

Clone the repository: git clone https://github.com/orange-cloudfoundry/orange-cf-bosh-cli.git

Then, build the image: docker build -t cf-bosh-cli:<image_tag> .

How to use it

Note:
When connected, you can see cli/tools/aliases list with tools command from shell interface.

How to use as standalone container (if you have a simple docker host)
With public ssh key provided to the container

Launch the image. Don't miss to assign an host port to the container ssh port (22) : docker run --name bosh-cli -d -p 2222:22 -v /home/bosh -v /data -e "SSH_PUBLIC_KEY=<path_to_your_public_ssh-rsa_key>" orangecloudfoundry/orange-cf-bosh-cli

Then, log into the container with ssh : ssh -p 2222 -i <path_to_your_rsa_private_key> bosh@localhost

The password is completely disabled. By default, the file containing the public key ~/.ssh/authorized_keys is overwrited after container restart or update.

How to use it using "Docker Bosh Release"

Another option is to deploy the container threw the "Docker Bosh Release" (https://github.com/cloudfoundry-community/docker-boshrelease).

In the following example:

  • We deploy 1 instance of the container.
  • The homedirectory of the bosh account is a private docker volume.
  • The directory /data is a shared docker volume (from the container called "data_container").
  • The first container has a provided public key.

Bosh deployment manifest exmple:

deployment_name = 'bosh-cli'
static_ip = 'xx.xx.xx.xx'
dns_servers = 'xx.xx.xx.xx'
http_proxy = 'http://proxy:3128'
https_proxy = 'http://proxy:3128'
docker_image = 'orangecloudfoundry/orange-cf-bosh-cli'
docker_tag = 'latest'
---
name: <deployment_name>
director_uuid: <director_uuid>

releases:
 - name: docker
   version: latest

compilation:
  workers: 1
  network: default
  reuse_compilation_vms: true
  cloud_properties:
    cpu: 1
    disk: 8096
    ram: 2048

update:
  canaries: 0
  canary_watch_time: 30000-1200000
  update_watch_time: 30000-1200000
  max_in_flight: 32
  serial: false

networks:
- name: default
  type: manual
  subnets:
    - range: xx.xx.xx.xx/xx
      reserved:
      - xx.xx.xx.xx-xx.xx.xx.xx
      static:
      - <static_ip>
      gateway: xx.xx.xx.xx
      dns: [<dns_servers>]
      cloud_properties:
        name: NET

resource_pools:
- name: default
  stemcell:
    name: xxx
    version: latest
  network: default
  cloud_properties:
    ram: 512
    disk: 4_096
    cpu: 2

jobs:
  - name: bosh-cli
    templates:
      - name: docker
      - name: containers
    instances: 1
    resource_pool: default
    persistent_disk: 102_400
    networks:
      - name: default
        default: [dns, gateway]
        static_ips:
          - <static_ip>

properties:
  containers:
  - name: data_container
    image: <docker_image>:<docker_tag>
    bind_volumes:
    - "/data"
    volumes:
    - "/etc/ssl/certs:/etc/ssl/certs:ro"
    - "/var/vcap/data/tmp/bosh-cli:/var/tmp/bosh-cli:ro"

  - name: user1_bosh_cli
    image: <docker_image>:<image_tag>
    hostname: user1_bosh_cli
    env_vars:
    - "SSH_PUBLIC_KEY=<your_ssh-rsa_public_key>"
    bind_ports:
    - "2222:22"
    volumes:
    - /home/bosh
    depends_on:
    - data_container
    volumes_from:
    - data_container

  - name: user2_bosh_cli
    image: <docker_image>:<image_tag>
    hostname: user2_bosh_cli
    env_vars:
    - "SSH_PUBLIC_KEY=<your_ssh-rsa_public_key>"
    bind_ports:
    - "2223:22"
    volumes:
    - /home/bosh
    depends_on:
    - data_container
    volumes_from:
    - data_container

Then, log into the container you want with ssh : ssh -i <path_to_your_rsa_private_key> -p 2222 [email protected] to log into first container (replace docker.bosh.release.deployment with IP or dns name of docker host deployed using bosh release).

Tag summary

Content type

Image

Digest

Size

580.8 MB

Last updated

about 5 years ago

docker pull orangecloudfoundry/orange-cf-bosh-cli:3.0.3