Skip to content

Improve dind documentation and fix dind testing - #4707

Merged
openshift-bot merged 13 commits into
openshift:masterfrom
marun:add-dind-docs
Oct 28, 2015
Merged

openshift-bot merged 13 commits into
openshift:masterfrom
marun:add-dind-docs

Conversation

@marun

@marun marun commented Sep 17, 2015

Copy link
Copy Markdown
Contributor

The contribution doc may not be the best place for this, so placement suggestions are welcome.

Comment thread CONTRIBUTING.adoc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So does "dind-cluster.sh start" pull in the latest openshift binary and sdn scripts? Or do you mean "it's a one-time cost if you plan to do a bunch of testing against a particular checkout of origin"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"dind-cluster.sh start" creates containers that mount the repo, builds the binaries and configuration in the master container as part of the master deploy, and then deploys to the node containers. It's very similar to how the vagrant deploy works (equivalent to 'vagrant up'). The 'one-time cost' I'm referring to is the package installation on the vm (dnf update && dnf install docker...) and the base dind image (dnf update && dnf install openvswitch docker...).

Would it be useful to make that explicit? e.g. "Package installation on the VM and building the dind image" and "openshift will be built as part of cluster creation"?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, maybe split it up into two parts, with everything up to "vagrant up" being explained as one-time setup, and then ssh+cd+start as the iteratable part.

@marun

marun commented Sep 24, 2015

Copy link
Copy Markdown
Contributor Author

@danwinship Hopefully the latest patchset addresses your concerns. I've also enhanced the vagrant provisioning to allow dind cluster interaction directly from the VM (it had previously been necessary to login to one of the containers).

@marun marun changed the title Add dind detail to the contribution doc Improve dind documentation Sep 24, 2015
@danwinship

Copy link
Copy Markdown
Contributor

lgtm

@marun

marun commented Oct 8, 2015

Copy link
Copy Markdown
Contributor Author

This latest patchset cleans up vagrant deployment and ensures that the networking tests can be executed.

If you've already deployed a vagrant vm, you can either recreate the vm or run the following steps to run the tests:

# Login to vagrant vm
$ vagrant ssh

# Set the gopath
$ export GOPATH=/vagrant/_output/local/go

# Add the gopath to the user's profile
$ echo ${GOPATH} >> ~/.bash_profile

# Install ginkgo
go get github.com/onsi/ginkgo/ginkgo

# Restart the cluster
hack/dind-cluster restart

# Run the tests
hack/dind-cluster test-net-e2e

@marun

marun commented Oct 8, 2015

Copy link
Copy Markdown
Contributor Author

[test]

@marun marun changed the title Improve dind documentation Improve dind documentation and fix dind testing Oct 8, 2015
@openshift-bot

Copy link
Copy Markdown
Contributor

@marun

marun commented Oct 9, 2015

Copy link
Copy Markdown
Contributor Author

[test]

Comment thread CONTRIBUTING.adoc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

FWIW, most oc commands seem to work, but "oc project foo" gives an error. ("oc new-project foo" creates the project successfully, but then gives an error when trying to switch to it):

[vagrant@openshift-dind-host vagrant]$ oc new-project foo
error: open /tmp/openshift-dind-cluster/openshift/openshift.local.config/master/admin.kubeconfig: permission denied

@danwinship

Copy link
Copy Markdown
Contributor

otherwise lgtm

@marun

marun commented Oct 14, 2015

Copy link
Copy Markdown
Contributor Author

@danwinship Latest patchset should fix the permission issue.

@marun

marun commented Oct 16, 2015

Copy link
Copy Markdown
Contributor Author

[test]

@openshift-bot openshift-bot removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Oct 22, 2015
@marun

marun commented Oct 26, 2015

Copy link
Copy Markdown
Contributor Author

This PR allows the extended networking tests to run. Getting them passing will be a subsequent effort.

marun added 10 commits October 26, 2015 17:52
This change adds a new dind-specific vagrant provision script that
ensures that the vagrant and root accounts on the VM can interact with
the default dind cluster via the 'oc' and 'openshift' accounts.
Commit 82c73ed broke the extended
networking tests when it separated networking and non-networking tests
into separate binaries but failed to update the networking test
invocation to reflect the new target.
Fedora 22 package download is unreliable.
jpetazzo's version is effectively deprecated now that upstream docker
has taken over maintenance.
Origin builds on servers with 2gb of ram can run out of memory with go
1.5.
marun added 2 commits October 26, 2015 19:20
Previously nfs was only used for a dev cluster, but it should apply for
dind dev cluster as well.
 - allow docker to be run as non-root
 - install ginkgo automatically
 - ensure that cluster configuration is readable by vagrant user
 - fix broken 'hack/dind-cluster.sh test-net-e2e' command
 - run setenforce with sudo
@dcbw

dcbw commented Oct 27, 2015

Copy link
Copy Markdown
Contributor

LGTM

@eparis

eparis commented Oct 27, 2015

Copy link
Copy Markdown
Member

Am I understanding correctly that the extended network testing is running, but failing now? Yeah, we can't merge something we know will break CI for everyone else. Maybe I'm misunderstanding the openshift-jenkins/test failure:

Directory /var/lib/docker/vfs/dir does not exist, skipping.
Error while running ssh/sudo command: 
set -e
pushd /data/src/github.com/openshift//origin >/dev/null
export PATH=$GOPATH/bin:$PATH

echo '***************************************************'
echo 'Running test/extended/networking.sh...'
time test/extended/networking.sh
echo 'Finished test/extended/networking.sh'
echo '***************************************************'

popd >/dev/null

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

@eparis

eparis commented Oct 27, 2015

Copy link
Copy Markdown
Member

[test]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 7401086

@eparis

eparis commented Oct 28, 2015

Copy link
Copy Markdown
Member

[merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/6237/) (Image: devenv-rhel7_2583)

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to 7401086

openshift-bot pushed a commit that referenced this pull request Oct 28, 2015
@openshift-bot
openshift-bot merged commit d7a2bdc into openshift:master Oct 28, 2015
@marun
marun deleted the add-dind-docs branch February 17, 2016 17:32
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.

5 participants