Skip to content

Commit 0df5d81

Browse files
committed
Initial commit
0 parents  commit 0df5d81

File tree

6,678 files changed

+3143503
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,678 files changed

+3143503
-0
lines changed

.clang-format

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
BasedOnStyle: Google
3+
AllowShortIfStatementsOnASingleLine: false
4+
AllowShortLoopsOnASingleLine: false
5+
IndentCaseLabels: false
6+
AccessModifierOffset: -1
7+
DerivePointerAlignment: false
8+
PointerAlignment: Right
9+
AllowShortFunctionsOnASingleLine: Empty

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
build/*
2+
*.kdev4
3+
*.kdevelop
4+
*.swagger-codegen
5+
swagger-codegen*
6+
.vscode/*

.gitmodules

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[submodule "src/libs/bcc"]
2+
path = src/libs/bcc
3+
url = https://github.com/polycube-network/bcc.git
4+
ignore = untracked
5+
branch = polycube
6+
[submodule "src/libs/iptables"]
7+
path = src/components/iptables/iptables
8+
url = https://github.com/polycube-network/iptables
9+
ignore = untracked
10+
branch = polycube
11+
[submodule "src/components/iptables/iptables"]
12+
path = src/components/iptables/iptables
13+
url = https://github.com/polycube-network/iptables.git
14+
branch = polycube

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
sha: v1.2.0
4+
hooks:
5+
- id: trailing-whitespace

AUTHORS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
The following people, in alphabetical order, have either authored or signed
2+
off on commits in the Polycube repository:
3+
4+
Aasif Shaikh [email protected]
5+
Fulvio Risso [email protected]
6+
Jianwen Pi [email protected]
7+
Matteo Bertrone [email protected]
8+
Mauricio Vásquez Bernal [email protected]
9+
Sebastiano Miano [email protected]
10+
Yunsong Lu [email protected]
11+
12+
The following additional people are mentioned in commit logs as having provided
13+
helpful bug reports, suggestions or have otherwise provided value to the
14+
project:
15+

CHANGELOG

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
v0.10.0+
2+
-------------------
3+
- Fix deadlock when removing port
4+
- Implement certificate based security
5+
6+
v0.10.0
7+
-------------------
8+
- Introduce CHANGELOG
9+
- Fix /cubes/ API
10+
- Fix /netdevs/ API
11+
- Improve versioning support
12+
- Fix potential dataraces in cubes
13+
- Implement egress support for XDP cubes
14+
- Improved API for eBPF maps

CMakeLists.txt

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
cmake_minimum_required (VERSION 3.2)
2+
3+
project(polycube)
4+
5+
set (CMAKE_CXX_STANDARD 11)
6+
7+
include(cmake/GetGitRevisionDescription.cmake)
8+
9+
# TODO: remove --tags in following commands once we
10+
# have the first annotated tag version
11+
12+
# if this commit matches a tag, use that for the version, otherwise
13+
# append a '+' to it and get the commit info.
14+
git_get_exact_tag(EXTACT_GIT_TAG --abbrev=0 --tags)
15+
if (EXTACT_GIT_TAG)
16+
set(VERSION ${EXTACT_GIT_TAG})
17+
else ()
18+
git_describe(GIT_TAG --abbrev=0 --tags)
19+
20+
get_git_head_revision(GIT_REFSPEC GIT_SHA1 --tags)
21+
string(SUBSTRING "${GIT_SHA1}" 0 8 GIT_SHA1_SHORT)
22+
23+
# get branch
24+
if (GIT_REFSPEC)
25+
string(REPLACE "/" ";" GIT_REFSPEC_LIST ${GIT_REFSPEC})
26+
list(GET GIT_REFSPEC_LIST -1 GIT_BRANCH)
27+
else ()
28+
set(GIT_BRANCH "NOT_FOUND")
29+
endif()
30+
31+
# check if tree is dirty
32+
git_describe(GIT_TAG_DIRTY --abbrev=0 --tags --dirty=magic0x6457)
33+
if (GIT_TAG_DIRTY MATCHES ^.*magic0x6457)
34+
set(IS_DIRTY "-dirty")
35+
endif ()
36+
37+
set(VERSION "${GIT_TAG}+ [git: (branch/commit): ${GIT_BRANCH}/${GIT_SHA1_SHORT}${IS_DIRTY}]")
38+
endif ()
39+
40+
message(STATUS "Version is ${VERSION}")
41+
42+
add_subdirectory(src)

COPYRIGHT

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2018 The Polycube Authors
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# syntax = tonistiigi/dockerfile:runmount20180618 # enables --mount option for run
2+
FROM ubuntu:18.04
3+
ARG MODE=default
4+
RUN --mount=target=/polycube cp -r /polycube /tmp/polycube && \
5+
cd /tmp/polycube && \
6+
SUDO="" WORKDIR="/tmp/dev" ./scripts/install.sh $MODE && \
7+
# install pcn-kubernetes only components
8+
if [ "$MODE" = "pcn-k8s" ] ; then \
9+
export GOPATH=$HOME/go && \
10+
go get github.com/containernetworking/plugins/pkg/ip && \
11+
go get k8s.io/client-go/... && \
12+
go get golang.org/x/net/context && \
13+
go get golang.org/x/oauth2 && \
14+
cd /tmp && mkdir -p tmp && cd tmp && \
15+
curl -sS -L https://storage.googleapis.com/kubernetes-release/network-plugins/cni-0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff.tar.gz -o cni.tar.gz && \
16+
tar -xvf cni.tar.gz && \
17+
mkdir /cni && \
18+
cp bin/loopback /cni && \
19+
cd /tmp/polycube/src/components/k8s/cni/ && \
20+
./build.sh && \
21+
cd $HOME/go/src/github.com/polycube-network/polycube/src/components/k8s/cni/conf && \
22+
GOOS=linux go build -o /cni-conf . && \
23+
cd $HOME/go/src/github.com/polycube-network/polycube/src/components/k8s/pcn_k8s/ && \
24+
GOOS=linux go build -o /pcn_k8s . ; \
25+
fi && \
26+
apt-get purge --auto-remove -y git bison cmake flex \
27+
libllvm5.0 llvm-5.0-dev libclang-5.0-dev uuid-dev autoconf \
28+
golang-go libtool curl && \
29+
apt-get clean && \
30+
rm -fr /root /var/lib/apt/lists/* /tmp/* /var/tmp/*
31+
# TODO: which other apt-get packages can be removed?
32+
33+
ADD src/components/k8s/cni/cni-install.sh /cni-install.sh
34+
ADD src/components/k8s/cni/cni-uninstall.sh /cni-uninstall.sh
35+
ADD src/components/k8s/pcn_k8s/cleanup.sh /cleanup.sh
36+
ADD src/components/k8s/pcn_k8s/init.sh /init.sh
37+
38+
CMD ["polycubed"]

0 commit comments

Comments
 (0)