diff --git a/virtcontainers/.ci/go-lint.sh b/virtcontainers/.ci/go-lint.sh deleted file mode 100755 index cdadaf46b2..0000000000 --- a/virtcontainers/.ci/go-lint.sh +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) 2017 Intel Corporation - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -#!/bin/bash - -if [ ! $(command -v gometalinter) ] -then - go get github.com/alecthomas/gometalinter - gometalinter --install --vendor -fi - -linter_args="--tests --vendor" - -# When running the linters in a CI environment we need to disable them all -# by default and then explicitly enable the ones we are care about. This is -# necessary since *if* gometalinter adds a new linter, that linter may cause -# the CI build to fail when it really shouldn't. However, when this script is -# run locally, all linters should be run to allow the developer to review any -# failures (and potentially decide whether we need to explicitly enable a new -# linter in the CI). -if [ "$CI" = true ]; then - linter_args+=" --disable-all" -fi - -linter_args+=" --enable=misspell" -linter_args+=" --enable=vet" -linter_args+=" --enable=ineffassign" -linter_args+=" --enable=gofmt" -linter_args+=" --enable=gocyclo" -linter_args+=" --cyclo-over=15" -linter_args+=" --enable=golint" -linter_args+=" --deadline=600s" - -eval gometalinter "${linter_args}" ./... diff --git a/virtcontainers/.ci/go-test.sh b/virtcontainers/.ci/go-test.sh deleted file mode 100755 index bca3c4167e..0000000000 --- a/virtcontainers/.ci/go-test.sh +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2017 Intel Corporation - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -#!/bin/bash - -set -e - -test_packages=$(go list ./... | grep -v vendor) -test_ldflags="-X github.com/kata-containers/runtime/virtcontainers/pkg/mock.DefaultMockCCShimBinPath=$1 \ - -X github.com/kata-containers/runtime/virtcontainers/pkg/mock.DefaultMockKataShimBinPath=$2 \ - -X github.com/kata-containers/runtime/virtcontainers/pkg/mock.DefaultMockHookBinPath=$3" -echo "Run go test and generate coverage:" -for pkg in $test_packages; do - if [ "$pkg" = "github.com/kata-containers/runtime/virtcontainers" ]; then - sudo env GOPATH=$GOPATH GOROOT=$GOROOT PATH=$PATH go test -ldflags "$test_ldflags" -cover -coverprofile=profile.cov $pkg - else - sudo env GOPATH=$GOPATH GOROOT=$GOROOT PATH=$PATH go test -ldflags "$test_ldflags" -cover $pkg - fi -done diff --git a/virtcontainers/.ci/jenkins_job_build.sh b/virtcontainers/.ci/jenkins_job_build.sh deleted file mode 100755 index 30b2690ad6..0000000000 --- a/virtcontainers/.ci/jenkins_job_build.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -e - -vc_repo="github.com/containers/virtcontainers" - -# Export all environment variables needed. -export GOROOT="/usr/local/go" -export GOPATH=${HOME}/go -export PATH=${GOPATH}/bin:/usr/local/go/bin:/usr/sbin:${PATH} -export CI=true - -# Download and build goveralls binary in case we need to submit the code -# coverage. -if [ ${COVERALLS_REPO_TOKEN} ] -then - go get github.com/mattn/goveralls -fi - -# Get the repository and move HEAD to the appropriate commit. -go get ${vc_repo} || true -cd "${GOPATH}/src/${vc_repo}" -if [ "${ghprbPullId}" ] && [ "${ghprbTargetBranch}" ] -then - git fetch origin "pull/${ghprbPullId}/head" && git checkout master && git reset --hard FETCH_HEAD && git rebase "origin/${ghprbTargetBranch}" - - export AUTHOR_REPO_GIT_URL="${ghprbAuthorRepoGitUrl}" - export COMMIT_REVISION="${ghprbActualCommit}" -else - git fetch origin && git checkout master && git reset --hard origin/master -fi - -# Setup environment and run the tests -sudo -E PATH=$PATH bash .ci/setup.sh -sudo -E PATH=$PATH bash .ci/run.sh - -# Publish the code coverage if needed. -if [ ${COVERALLS_REPO_TOKEN} ] -then - sudo -E PATH=${PATH} bash -c "${GOPATH}/bin/goveralls -repotoken=${COVERALLS_REPO_TOKEN} -coverprofile=profile.cov" -fi diff --git a/virtcontainers/.ci/run.sh b/virtcontainers/.ci/run.sh deleted file mode 100755 index dbbae18c72..0000000000 --- a/virtcontainers/.ci/run.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2017 Intel Corporation - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -e - -export CI=true -tests_repo="github.com/clearcontainers/tests" - -make check - -sudo -E PATH=$PATH sh -c "go test -bench=." - -sudo -E PATH=$PATH sh -c "go test -bench=CreateStartStopDeletePodQemuHypervisorNoopAgentNetworkCNI -benchtime=60s" - -sudo -E PATH=$PATH sh -c "go test -bench=CreateStartStopDeletePodQemuHypervisorHyperstartAgentNetworkCNI -benchtime=60s" - -pushd "${GOPATH}/src/${tests_repo}" -.ci/run.sh -popd diff --git a/virtcontainers/.ci/setup.sh b/virtcontainers/.ci/setup.sh deleted file mode 100755 index f53d3fa02c..0000000000 --- a/virtcontainers/.ci/setup.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -e - -cidir=$(dirname "$0") -tests_repo="github.com/clearcontainers/tests" - -# Clone Tests repository. -go get "$tests_repo" - -tests_repo_dir="${GOPATH}/src/${tests_repo}" - -echo "Update proxy and runtime vendoring" -sudo -E PATH=$PATH bash -c "${cidir}/update-vendoring.sh" - -pushd "${tests_repo_dir}" -echo "Setup Clear Containers" -sudo -E PATH=$PATH bash -c ".ci/setup.sh" -popd - -echo "Setup virtcontainers environment" -chronic sudo -E PATH=$PATH bash -c "${cidir}/../utils/virtcontainers-setup.sh" - -echo "Install virtcontainers" -chronic make -chronic sudo make install diff --git a/virtcontainers/.ci/update-vendoring.sh b/virtcontainers/.ci/update-vendoring.sh deleted file mode 100755 index a836a7650e..0000000000 --- a/virtcontainers/.ci/update-vendoring.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This script is used to update the virtcontainers code in the vendor -# directories of the proxy and runtime repositories. - -set -e - -proxy_repo="github.com/clearcontainers/proxy" -runtime_repo="github.com/clearcontainers/runtime" -virtcontainers_repo="github.com/kata-containers/runtime/virtcontainers" - -function apply_depends_on(){ - pushd "${GOPATH}/src/${virtcontainers_repo}" - label_lines=$(git log --format=%s%b -n 1 | grep "Depends-on:" || true) - - if [ "${label_lines}" == "" ]; then - return 0 - fi - - nb_lines=$(echo ${label_lines} | wc -l) - - for i in `seq 1 ${nb_lines}` - do - label_line=$(echo $label_lines | sed "${i}q;d") - label_str=$(echo "${label_line}" | cut -d' ' -f2) - repo=$(echo "${label_str}" | cut -d'#' -f1) - pr_id=$(echo "${label_str}" | cut -d'#' -f2) - - if [ ! -d "${GOPATH}/src/${repo}" ]; then - go get -d "$repo" || true - fi - - pushd "${GOPATH}/src/${repo}" - git fetch origin "pull/${pr_id}/head" && git checkout FETCH_HEAD && git rebase origin/master - popd - done - - popd -} - -function install_dep(){ - go get -u github.com/golang/dep/cmd/dep -} - -function update_repo(){ - if [ "${AUTHOR_REPO_GIT_URL}" ] && [ "${COMMIT_REVISION}" ] - then - repo="$1" - if [ ! -d "${GOPATH}/src/${repo}" ]; then - go get -d "$repo" || true - fi - - pushd "${GOPATH}/src/${repo}" - - # Update Gopkg.toml - cat >> Gopkg.toml < -``` - -For example: - -``` - pod: Remove token from Cmd structure - - The token and pid data will be hold by the new Process structure and - they are related to a container. - - Signed-off-by: Sebastien Boeuf -``` - -Note, that the body of the message should not just be a continuation of the subject line, and is not used to extend the subject line beyond its length limit. They should stand alone as complete sentence and paragraphs. - -It is recommended that each of your patches fixes one thing. Smaller patches are easier to review, and are thus more likely to be accepted and merged, and problems are more likely to be picked up during review. - -### Breaking compatibility - -In case the patch you submit will break virtcontainers CI, because Clear Containers runtime compatibility is tested through the CI, you have to specify which repository and which pull request it depends on. - -Using a simple tag `Depends-on:` in your commit message will allow virtcontainers CI to run properly. Notice that this tag is parsed from the latest commit of the pull request. - -For example: - -``` - pod: Remove token from Cmd structure - - The token and pid data will be hold by the new Process structure and - they are related to a container. - - Depends-on: github.com/clearcontainers/runtime#75 - - Signed-off-by: Sebastien Boeuf -``` - -In this example, we want our CI scripts to fetch the pull request 75 of the runtime repository. - - -## Pull requests - -We accept [github pull requests](https://github.com/containers/virtcontainers/pulls). - -Github has a basic introduction to the process [here](https://help.github.com/articles/using-pull-requests/). - -When submitting your Pull Request (PR), treat the Pull Request message the same you would a patch message, including pre-fixing the title with a subsystem name. Github by default seems to copy the message from your first patch, which many times is appropriate, but please ensure your message is accurate and complete for the whole Pull Request, as it ends up in the git log as the merge message. - -Your pull request may get some feedback and comments, and require some rework. The recommended procedure for reworking is to rework your branch to a new clean state and 'force push' it to your github. GitHub understands this action, and does sensible things in the online comment history. Do not pile patches on patches to rework your branch. Any relevant information from the github comments section should be re-worked into your patch set, as the ultimate place where your patches are documented is in the git log, and not in the github comments section. - -For more information on github 'force push' workflows see [here](http://blog.adamspiers.org/2015/03/24/why-and-how-to-correctly-amend-github-pull-requests/). - -It is perfectly fine for your Pull Request to contain more than one patch - use as many patches as you need to implement the Request (see the previously mentioned 'small patch' thoughts). Each Pull Request should only cover one topic - if you mix up different items in your patches or pull requests then you will most likely be asked to rework them. - -## Reviews - -Before your Pull Requests are merged into the main code base, they will be reviewed. Anybody can review any Pull Request and leave feedback (in fact, it is encouraged). - -We use an 'acknowledge' system for people to note if they agree, or disagree, with a Pull Request. We utilise some automated systems that can spot common acknowledge patterns, which include placing any of these at the beginning of a comment line: - - - LGTM - - lgtm - - +1 - - Approve - -### Project maintainers - -The virtcontainers maintainers will be the ones accepting or rejecting any pull request. They are listed in the OWNERS files, and there can be one OWNERS file per directory. - -The OWNERS files split maintainership into 2 categories: reviewers and approvers. All approvers also belong to the reviewers list and there must be one approval from one member of each list for a pull request to be merged. - -Since approvers are also reviewers, they technically can approve a pull request without getting another reviewer's approval. However, it is their due diligence to rely on reviewers and should use their approval power only in very specific cases. - -## Issue tracking - -To report a bug that is not already documented, please [open an -issue in github](https://github.com/containers/virtcontainers/issues/new) so we all get -visibility on the problem and work toward resolution. - -## Closing issues - -You can either close issues manually by adding the fixing commit SHA1 to the issue -comments or by adding the `Fixes` keyword to your commit message: - -``` - pod: Remove token from Cmd structure - - The token and pid data will be hold by the new Process structure and - they are related to a container. - - Fixes #123 - - Signed-off-by: Sebastien Boeuf -``` - -Github will then automatically close that issue when parsing the -[commit message](https://help.github.com/articles/closing-issues-via-commit-messages/). diff --git a/virtcontainers/NEWS b/virtcontainers/NEWS deleted file mode 100644 index 14735578c5..0000000000 --- a/virtcontainers/NEWS +++ /dev/null @@ -1,131 +0,0 @@ -1.0.7: - Added ARM64 support - Added Kata Containers support - Added dockershim support - Added govmm support - Added support for the one proxy per VM model - Added 1.0 API documentation - Added hotplug support for QEMU's Q35 machine type - Fixed the agent, proxy and shim hierarchy - Fixed the state storage implementation - -1.0.6: - Added SRIOV support - Added Multi-OS support - Removed Travis CI - -1.0.5: - Added full CI (unit, functional and integration tests) - Added docker ps command support - Added multi-queue macvtap to the list of networking models - Added --device support for block devices (emulated) - Added pod shared locks for more efficient locking - Removed the ciao uuid package dependency - -1.0.4: - Added shim debug output - Added support for custom qemu accelerators - Added structured logging - Added drive hotplug support for all containers - Fixed pod block index accounting - Fixed vendoring model - -1.0.3: - Added initial device assignment framework - Added VFIO devices assignment initial support - Fixed pod locking - Fixed unconfigured interfaces handling - -1.0.2: - Added James Hunt as maintainer - Added huge pages support - Added option for disabling nesting optimizations - Fixed the rootfs readonly support - -1.0.1: - Added QEMU memory locking support - -1.0.0: - Added support for memory and cpu reservation - Added stroage hotplug support - Added code of conduct - Added memory pre-allocation, realtime and memory locking support - Fixed nested virtualization support - Fixed log verbosity - Fixed pod cleanup - -1.0.0-rc.4: - Added new project approvers - Fixed gometalinter - Increased unit test coverage - Added "pc" machine type for Qemu hypervisor - Fixed "kill" and "stop" container - -1.0.0-rc.3: - Added support for assigning the container rootfs underlying block device to the VM (when using devicemapper) - Changed qemu to use virtio-net vhost by default - Changed qemu parameters to not be Clear Containers specific - Fixed MTU passing to hyperstart - -1.0.0-rc.2: - Added support for transitioning from Ready to Stopped - Fixed pod container creation - Fixed CRI-O support for sandbox identifiers - -1.0.0-rc.1: - Added standard error for invalid pod resources - Fixed docker gateway routing - -1.0.0-rc.0: - Added pod pause and resume support - Added bind mounts support - Added CRI-O support - Added QEMU Q35 machine type support - Added readonly rootfs support - Added annotations passing to the OCI config file - Fixed hyperstart users and groups management - Fixed the installation and build scripts - Fixed networking MAC address configuration - -0.7.0: - Added Clear Containers 3.0 shim support - Added Clear Containers 3.0 proxy protocol support - Added self contained hyperstart package - Added full build scripts - Added hypervisor and pod debug options - Added command line and function arguments validity checks - Added logrus support, replacing glog - Added OCI runtime vendoring - Added structured and separated error definitions - Fixed networking support and unit testing - Fixed code layering by keeping generic code out of interface implementations - Fixed benchmarks - -0.6.0: - Added pullapprove support - Added Slack integration - Added KillContainer API - Added networking documentation - Added a Process structure for describing container processes - Added a more complete pod and container status structure - Fixed hyperstart implementation for stopping containers - -0.5.0: - Changed the CreatePod/StartPod logic - Added an OCI config file conversion package - Added initial benchmarks - Added more CNI network unit tests - Moved all non virtcontainers packages under pkg/ - Fixed netns race conditions - -0.4.0: - Added CNM network model support - Added hyperstart asynchronous events support - Added low level CTL routines - Added OCI compatible hooks support - Added Travis code coverage report - -0.3.0: - Added support for the latest hyperstart changes - Added proxy interface and cc-proxy implementation - Added CNI unit tests diff --git a/virtcontainers/OWNERS b/virtcontainers/OWNERS deleted file mode 100644 index 1f281f5542..0000000000 --- a/virtcontainers/OWNERS +++ /dev/null @@ -1,7 +0,0 @@ -reviewers: -- virtcontainers-maintainers - -approvers: -- sameo -- sboeuf -- jodh-intel