concourse / concourse-bosh-deployment

A toolchain for deploying Concourse with BOSH.
Apache License 2.0
86 stars 155 forks source link

ATC container placement strategy - HTTP 404 from config server #134

Closed BarryWilliams closed 5 years ago

BarryWilliams commented 5 years ago

I am deploying concourse with bbl and bosh. With the latest commit, I get this error (where I didn't get this error when deploying with the previous commit):

Task 10 | 14:26:50 | Error: Unable to render instance groups for deployment. Errors are:
  - Unable to render jobs for instance group 'web'. Errors are:
    - Unable to render templates for job 'atc'. Errors are:
      - Failed to find variable '/bosh-bbl-env-superior-2019-01-10t21-46z/concourse/container_placement_strategy' from config server: HTTP Code '404', Error: 'The request could not be completed because the credential does not exist or you do not have sufficient authorization.'

introduced on this commit

It was working fine with the same inputs on the previous commit

Here is how I am starting the deploy:

# Removed bbl setup stuff
bbl plan --lb-type concourse
bbl up

eval "$(bbl print-env)"
bosh upload-stemcell "https://bosh.io/d/stemcells/bosh-azure-hyperv-ubuntu-xenial-go_agent"

git clone https://github.com/concourse/concourse-bosh-deployment.git
EXTERNAL_HOST="$(bbl outputs | grep concourse_lb_ip | cut -d ' ' -f2)"

pushd concourse-bosh-deployment/cluster
  cat > ../../vars/concourse-vars-file.yml <<EOL
external_host: "${EXTERNAL_HOST}"
external_url: "https://${EXTERNAL_HOST}"
local_user:
  username: "${USERNAME}"
  password: "${PASSWORD}"
network_name: 'private'
web_instances: 1
web_network_name: 'private'
web_vm_type: 'default'
web_network_vm_extension: 'lb'
db_vm_type: 'default'
db_persistent_disk_type: '1GB'
worker_instances: 2
worker_vm_type: 'default'
worker_ephemeral_disk: '50GB_ephemeral_disk'
deployment_name: 'concourse'
EOL

  echo "y" | bosh deploy -d concourse concourse.yml \
    -l ../versions.yml \
    -l ../../vars/concourse-vars-file.yml \
    -o operations/basic-auth.yml \
    -o operations/privileged-http.yml \
    -o operations/privileged-https.yml \
    -o operations/tls.yml \
    -o operations/tls-vars.yml \
    -o operations/web-network-extension.yml \
    -o operations/scale.yml \
    -o operations/worker-ephemeral-disk.yml

popd

To correct this, I now make it checkout the latest release (v4.2.1)

ozzozz commented 5 years ago

oh. container_placement_strategy variable has to be explicitly assigned now...

$ bosh int concourse-bosh-deployment/cluster/concourse.yml --var-errs
- Expected to find variables:
    - concourse_sha1
    - concourse_version
    - container_placement_strategy
    - db_persistent_disk_type
    - db_vm_type
    - deployment_name
    - external_url
    - garden_runc_sha1
    - garden_runc_version
    - network_name
    - postgres_password
    - postgres_sha1
    - postgres_version
    - token_signing_key
    - tsa_host_key
    - web_vm_type
    - worker_key
    - worker_vm_type

Exit code 1

container_placement_strategy comes from web job of concourse-bosh-release, and it has a default value "volume-locality". so this line should be removed, I think.

workaround: bosh deploy ... -v container_placement_strategy=volume-locality or add container_placement_strategy: volume-locality to your concourse-vars-file.yml

vito commented 5 years ago

sorry about that! fixed and added a separate ops file instead