Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create cloud agent image #2284

Merged
merged 6 commits into from
Feb 27, 2017
Merged

Create cloud agent image #2284

merged 6 commits into from
Feb 27, 2017

Conversation

2opremio
Copy link
Contributor

@2opremio 2opremio commented Feb 27, 2017

Fixes #2283 and includes the cloud-agent image in our CI and release pipelines.

To run the new cloud-agent image, just do

RELEASE=latest
TOKEN=shaiuhfquhqwofjwoisncasbifus
docker run --privileged  --net=host --pid=host -v /var/run/docker.sock:/var/run/docker.sock -v /var/run/scope/plugins:/var/run/scope/plugins -e CHECKPOINT_DISABLE weaveworks/cloud-agent:$RELEASE --probe.token=$TOKEN

(Edit: it also fixes #2279 )

@rade
Copy link
Member

rade commented Feb 27, 2017

docker run --privileged --net=host --pid=host -v /var/run/docker.sock:/var/run/docker.sock -v /var/run/scope/plugins:/var/run/scope/plugins -e CHECKPOINT_DISABLE weaveworks/cloud-agent:$TOKEN --probe.docker=true --probe.token=$TOKEN

I think you meant weaveworks/cloud-agent:$RELEASE.

Also, the plugins and checkpoint stuff can be omitted.

@2opremio
Copy link
Contributor Author

2opremio commented Feb 27, 2017

I think you meant weaveworks/cloud-agent:$RELEASE.

Yes, well spotted (edited)

Also, the plugins and checkpoint stuff can be omitted.

Up to whoever writes the docs ( @pidster ? ). I think it's worth mentioning it as optional though.

@rade
Copy link
Member

rade commented Feb 27, 2017

Couldn't we simply modify the existing entrypoint.sh file to only do the runsvinit dance when running both the app and probe?

That would work for the normal scope too.

@2opremio
Copy link
Contributor Author

2opremio commented Feb 27, 2017

Couldn't we simply modify the existing entrypoint.sh file to only do the runsvinit dance when running both the app and probe?

I want to keep the agent image as lean and simple as possible to avoid certification problems in the future.

That said, I don't discard doing what you suggest separately.

RUN apk add --update runit && \
rm -rf /var/cache/apk/*
ADD ./demo.json /
ADD ./weave ./weaveutil /usr/bin/

This comment was marked as abuse.

ADD ./docker /usr/local/bin/
ADD ./weave ./weaveutil /usr/bin/
COPY ./scope /home/weave/
ENTRYPOINT ["/home/weave/scope", "--mode=probe", "--probe-only"]

This comment was marked as abuse.

This comment was marked as abuse.

(test "${DOCKER_ORGANIZATION:-$DOCKER_USER}" == "weaveworks" || (
docker tag weaveworks/scope:latest ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:latest &&
docker tag weaveworks/scope:$(./tools/image-tag) ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:$(./tools/image-tag)
(test "${DOCKER_ORGANIZATION:-$DOCKER_USER}" != "weaveworks" && (

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

RUN apk add --update runit && \
rm -rf /var/cache/apk/*
ADD ./demo.json /
COPY ./runsvinit ./entrypoint.sh /home/weave/

This comment was marked as abuse.

This comment was marked as abuse.

bin/release Outdated
for IMAGE in $IMAGES; do
$SUDO docker tag "$DOCKERHUB_USER/$IMAGE" "$DOCKERHUB_USER/$IMAGE:$VERSION"
$SUDO docker push "$DOCKERHUB_USER/$IMAGE:$VERSION"
$SUDO docker tag "$DOCKERHUB_USER/$IMAGE:$VERSION" "$DOCKERHUB_USER/scope:latest_release"

This comment was marked as abuse.

This comment was marked as abuse.

@fbarl
Copy link
Contributor

fbarl commented Feb 27, 2017

How about adding cloud-agent.tar to .gitignore?

@2opremio
Copy link
Contributor Author

How about adding cloud-agent.tar to .gitignore?

Good point, will do

Copy link
Contributor

@fbarl fbarl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to squash the commits! :)

@2opremio 2opremio merged commit 98395bb into master Feb 27, 2017
@2opremio 2opremio deleted the create-cloud-agent-image branch February 27, 2017 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker Store cloud-agent: don't run 'runsvinit' Invert default of '--probe.docker' to match typical usage
3 participants