Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

docker run example for nats-release fails: cannot access '/usr/local/bin/create-release.sh': No such file or directory #517

Open
drnic opened this issue Sep 28, 2019 · 7 comments

Comments

@drnic
Copy link
Contributor

drnic commented Sep 28, 2019

https://github.com/cloudfoundry-incubator/fissile/blob/develop/docs/configuration.md#building-the-nats-image contains a docker run command that fails. What is the correct command for the image?

$ docker run --rm \
    --volume "${HOME}/.bosh/cache:/bosh-cache" \
    --volume "${PWD}/nats-release:${PWD}/nats-release" \
    --env "RUBY_VERSION=2.2.3" \
    splatform/bosh-cli \
    /usr/local/bin/create-release.sh \
        "$(id -u)" "$(id -g)" /bosh-cache --dir "${PWD}/nats-release" --force --name "nats"
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/usr/local/bin/create-release.sh\": stat /usr/local/bin/create-release.sh: no such file or directory": unknown.

I found a bosh.sh and quickly tried /usr/local/bin/bosh.sh create-release but it failed a different way:

docker run --rm \
    --volume "${HOME}/.bosh/cache:/bosh-cache" \
    --volume "${PWD}/nats-release:${PWD}/nats-release" \
    --env "RUBY_VERSION=2.2.3" \
    splatform/bosh-cli \
    /usr/local/bin/bosh.sh create-release \
        "$(id -u)" "$(id -g)" /bosh-cache --dir "${PWD}/nats-release" --force --name "nats"
/usr/local/bin/bosh.sh: line 27: addgroup: command not found
@drnic
Copy link
Contributor Author

drnic commented Sep 28, 2019

Is this docker command interchangeable with locally running cd nats-release && bosh create-release?

@jandubois
Copy link
Member

I think it is, but I wonder why you spend effort on what is essentially legacy cruft; this should probably be deleted from the documentation.

This functionality was used by SCF v1 and v2, when most bosh releases were git submodules inside the SCF repo. This is no longer the case; I think the only release still build with this mechanism is scf-release itself. All other releases are downloaded from either bosh.io, or from some other S3 buckets.

Also, in case this is not clear, most of the fissile functionality is only used by SCF v2. The only command needed for SCF v3/Quarks is fissile build release-image which turns a bosh release into a container image (one image per release, as opposed to the huge shared base-layer images used by v2).

So if you are only interested in Quarks, then you don't really care about all the other stuff (like role manifests). I kind of wish we had implemented fissile build release-image as a separate tool; it is only a subcommand because it re-uses a lot of the fissile code for building v2 images.

@drnic
Copy link
Contributor Author

drnic commented Sep 28, 2019 via email

@drnic
Copy link
Contributor Author

drnic commented Sep 28, 2019 via email

@drnic
Copy link
Contributor Author

drnic commented Sep 28, 2019

I'll start with https://github.com/SUSE/nats-container-deployment.

Edit: Nope, that looks like a pre-Quarks project too. SUSE/nats-container-deployment#10

@drnic
Copy link
Contributor Author

drnic commented Sep 28, 2019

For future me/others who accidentally try these old instructions, I got the following demo to work:

mkdir -p ~/workspace/redis
cd ~/workspace/redis
fissile build release-images --stemcell splatform/fissile-stemcell-opensuse:42.3-38.g82067a9-30.95 --name redis-boshrelease:15.3.3 --url https://github.com/cloudfoundry-community/redis-boshrelease/releases/download/v15.3.3/redis-15.3.3.tgz --sha1 022d18e68627549bb0a7fc50a9f22e54fe5307f9 --version 15.3.3 -w $PWD

docker run -ti redis:opensuse-42.3-38.g82067a9-30.95-7.0.0_354.gacefcfa4-15.3.3 /var/vcap/packages/redis-4/bin/redis-cli -v

As suggested https://github.com/cloudfoundry-incubator/cf-operator-ci/blob/master/pipelines/release-images/tasks/build.sh#L32-L34, I then re-tagged the image with an organization and pushed to docker hub cfcommunity/redis:opensuse-42.3-38.g82067a9-30.95-7.0.0_354.gacefcfa4-15.3.3

@drnic
Copy link
Contributor Author

drnic commented Sep 28, 2019

This issue can be closed if current docs are all deprecated/not expected to work for new users.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants