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

Ci tools documentation updates #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: C/C++ CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
# required for buildx and multi platform build
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.CR_USERNAME }}
password: ${{ secrets.CR_PAT }}
- uses: actions/checkout@v2
- name: Set the value
id: version_env
run: |
echo cat {{ $GITHUB_WORKSPACE}}/version.properties >> $GITHUB_ENV
- name: Build container image
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ secrets.CR_USERNAME }}/nettracer-bpf:latest
${{ secrets.CR_USERNAME }}/nettracer-bpf:${{ env.version }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ build/
*.a
*.so
*.so.*
.devspace/
36 changes: 34 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# NetTracer

## How to Contribute

You are welcome to contribute to NetTracer. Use issues for discussing proposals or to raise a question. If you have improvements to NetTracer, please submit your pull request. For those just getting started, consult this [guide](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).

## Local deployment environment setup necessary tools
* [Docker - One of containerization engines](https://docs.docker.com/engine/install/)
* [Minikube - local Kubernetes cluster](https://minikube.sigs.k8s.io/docs/start)
* [Kubectl - CLI tool for Kubernetes control](https://docs.docker.com/engine/install/)
* [DevSpace - Deploy & Develop Kubernetes Apps](https://devspace.sh/cli/docs/getting-started/installation/)
### Optional tools
* [Lens IDE - UI for kubectl commands](https://k8slens.dev)

## Quickstart

After installation of Docker and Minikube

```
minikube start --driver=docker
```

Inside repo folder run command and select branch:

```
devspace dev
```
It will take some time, project will be deployed into your local `minikube` cluster, and you will see deployment shell.
It's configured for a file sync between our Pods in k8s and your local project files.

To remove created resource
```
devspace purge
```
To stop, delete minikube cluster
```
minikube stop
minikube delete
```
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ SLAs apply according to the customer's support level.

## Contributing

See CONTRIBUTING.md for details on submitting changes.
See [CONTRIBUTING.md](./CONTRIBUTING.md) for details on how to submit changes and how to prepare [local development environment](./CONTRIBUTING.md#local-deployment-environment-setup-necessary-tools).

## License

NetTracer is under Apache 2.0 license. See LICENSE for details.
NetTracer is under Apache 2.0 license. See LICENSE for details.
59 changes: 59 additions & 0 deletions devspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
version: v1beta11

vars:
- name: IMAGE
value: augustris/nettracer-bpf
- name: BRANCH
default: master

deployments:
- name: nettracer-bpf
helm:
componentChart: true

values:
containers:
- image: ${IMAGE}

dev:
# `dev.sync` configures a file sync between our Pods in k8s and your local project files
sync:
- imageSelector: ${IMAGE}
excludePaths:
- .git/
- .devspace/
- .github/

terminal:
imageSelector: ${IMAGE}
command:
- /bin/bash
replacePods:
- imageSelector: ${IMAGE}
replaceImage: loftsh/alpine:latest
patches:
- op: replace
path: spec.containers[0].command
value:
- sleep
- op: replace
path: spec.containers[0].args
value:
- "9999999"
- op: remove
path: spec.containers[0].securityContext

profiles:
- name: production
merge:
images:
app:
image: ${IMAGE}
dockerfile: ./Dockerfile

dependencies:
- name: clone branch
source:
git: https://github.com/dynatrace-oss/nettracer-bpf
branch: ${BRANCH}
ignoreDependencies: true