Code Monkey home page Code Monkey logo

demo-bosh-dns-alias's Introduction

demo-bosh-dns-alias

Pre-requisition

Procedure

  1. upload os-conf release to BOSH director
bosh upload-release --sha1 7ef05f6f3ebc03f59ad8131851dbd1abd1ab3663 \
  https://bosh.io/d/github.com/cloudfoundry/os-conf-release?v=22.1.0
  1. Prepare test-dns-alias.yml
releases:
- name: os-conf
  version: 22.1.0
 
addons:
- name: test-dns-alias
  jobs:
  - name: pre-start-script
    release: os-conf
    properties:
      script: |-
        #!/bin/bash
        mkdir -p /var/vcap/jobs/test-dns-alias/dns/
        cat >  /var/vcap/jobs/test-dns-alias/dns/aliases.json << EOF
        {  "testingdomain":["1.2.3.4"],
           "_.sys.DOMAIN":["10.36.93.250"],
           "_.apps.DOMAIN":["10.36.93.250"],
           "_.tcp.DOMAIN":["10.36.93.249"],
           "ssh.DOMAIN":["10.36.93.248"],
           "opsmgr.DOMAIN":["10.36.93.247"]
        }
        EOF
  include:
    instance_groups:
    - diego_cell

The optional include section is used to control placement rules of the addon.

  1. update the runtime-config into BOSH director
bosh update-runtime-config --name=test-dns-alias ./test-dns-alias.yml
bosh configs
  1. deploy the cf
CF_DEP=$(bosh ds --column name | grep cf- | cut -f 1)
bosh -d ${CF_DEP} manifest > ${CF_DEP}.yml
bosh -d ${CF_DEP} deploy ${CF_DEP}.yml
  1. Once the deployment completes successfully, you could verify that the runtime-config test-dns-alias has been associated with the TAS deployment
bosh curl "/deployment_configs?deployment[]=${CF_DEP}" | jq .
  1. test if an app can resolve testingdomain to 1.2.3.4
cf ssh APP
nslookup testingdomain

demo-bosh-dns-alias's People

Contributors

chenweienn avatar

Watchers

 avatar

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.