virtcontainers: Remove redundant files

We will move the CI part into the top level .ci directory.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz 2018-02-23 15:25:15 +01:00
parent be72b6bd31
commit c446b0ef46
11 changed files with 0 additions and 693 deletions

View File

@ -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}" ./...

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 <<EOF
[[override]]
name = "${virtcontainers_repo}"
source = "${AUTHOR_REPO_GIT_URL}"
revision = "${COMMIT_REVISION}"
EOF
# Update the whole vendoring
dep ensure && dep ensure -update "${virtcontainers_repo}" && dep prune
popd
fi
}
apply_depends_on
install_dep
update_repo "${proxy_repo}"
update_repo "${runtime_repo}"

View File

@ -1,52 +0,0 @@
version: 2
requirements:
signed_off_by:
required: true
# Disallow approval of PRs still under development
always_pending:
title_regex: 'WIP'
labels:
- do-not-merge
- wip
explanation: 'Work in progress - do not merge'
group_defaults:
approve_by_comment:
enabled: true
approve_regex: '^(LGTM|lgtm|Approved|\+1|:\+1:)'
reject_regex: '^(Rejected|-1|:-1:)'
reset_on_push:
enabled: false
reset_on_reopened:
enabled: false
author_approval:
ignored: true
groups:
networking:
conditions:
files:
- pkg/cni/*
- cni*
- cnm*
required: 1
users:
- mcastelino
- sboeuf
approvers:
required: 1
users:
- sameo
- sboeuf
- amshinde
- jodh-intel
reviewers:
required: 1
teams:
- virtcontainers-maintainers
users:
- amshinde

View File

@ -1,74 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at
clear-containers-code-of-conduct@clearlinux.org. All complaints will be
reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct/
[homepage]: https://www.contributor-covenant.org

View File

@ -1,127 +0,0 @@
# Contributing to virtcontainers
virtcontainers is an open source project licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
## Coding Style (Go)
The usual Go style, enforced by `gofmt`, should be used. Additionally, the [Go
Code Review](https://github.com/golang/go/wiki/CodeReviewComments) document
contains a few common errors to be mindful of.
## Certificate of Origin
In order to get a clear contribution chain of trust we use the [signed-off-by language](https://01.org/community/signed-process)
used by the Linux kernel project.
## Patch format
Beside the signed-off-by footer, we expect each patch to comply with the following format:
```
Subsystem: Change summary (no longer than 75 characters)
More detailed explanation of your changes: Why and how.
Wrap it to 72 characters.
See:
http://chris.beams.io/posts/git-commit/
for some more good advice, and the Linux Kernel document:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches
Signed-off-by: <contributor@foo.com>
```
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 <sebastien.boeuf@intel.com>
```
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 <sebastien.boeuf@intel.com>
```
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 <sebastien.boeuf@intel.com>
```
Github will then automatically close that issue when parsing the
[commit message](https://help.github.com/articles/closing-issues-via-commit-messages/).

View File

@ -1,138 +0,0 @@
1.0.8:
Added support for CPU hotplug
Added SCSI support for drives and volumes
Added networking support for Kata Containers
Added block device hotplug support for Kata Containers
Added support for starting shim inside their own PID namespace
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

View File

@ -1,7 +0,0 @@
reviewers:
- virtcontainers-maintainers
approvers:
- sameo
- sboeuf
- jodh-intel