Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
092e057
test
etaques Nov 29, 2022
d7771bb
add runner label
etaques Nov 29, 2022
ac1fdb7
add runner label
etaques Nov 29, 2022
70cef6b
Update build-release.yml
etaques Nov 29, 2022
6939933
test runner label
etaques Nov 29, 2022
ae3bf03
set runner name
etaques Nov 29, 2022
eac9c72
change machine to be arm64
etaques Nov 29, 2022
f7e7f70
add arm32
Nov 29, 2022
d963968
back image to amd
etaques Nov 29, 2022
caba04a
add docker arm32
etaques Nov 29, 2022
1cd274d
test
etaques Nov 29, 2022
e09d8bd
Update security-group.tf
etaques Nov 29, 2022
3d27a15
Update user_data.sh
etaques Nov 29, 2022
2ee47ca
test
etaques Nov 29, 2022
50e29c1
test
etaques Nov 29, 2022
a4ba298
fix sg
etaques Nov 29, 2022
7fae40b
[FIX] add override configuration
etaques Nov 29, 2022
fc1df72
test
etaques Nov 29, 2022
3366fb4
Update entrypoint.sh
etaques Nov 29, 2022
26baa83
test
etaques Nov 29, 2022
c09e852
Update action.yml
etaques Nov 29, 2022
bb98568
Update Dockerfile
etaques Nov 29, 2022
f4f1299
Update action.yml
etaques Nov 29, 2022
c8e54b0
test
etaques Nov 29, 2022
e33d48c
fix typo
etaques Nov 29, 2022
15bdbea
Update Dockerfile
etaques Nov 29, 2022
b6c1b5c
set input setting
etaques Nov 30, 2022
0ea37e8
add corrade
etaques Nov 30, 2022
c72f0f7
test
etaques Nov 30, 2022
c5322a8
Update user_data.sh
etaques Nov 30, 2022
7d969e1
test
etaques Nov 30, 2022
1fd6441
Update user_data.sh
etaques Nov 30, 2022
a9917eb
Update entrypoint.sh
etaques Nov 30, 2022
a570291
Update vars.tf
etaques Nov 30, 2022
4b90568
qemu on arm32
etaques Nov 30, 2022
1d18675
fix for crashpad handler
etaques Nov 30, 2022
fb33611
Update user_data.sh
etaques Nov 30, 2022
ab7de36
test
etaques Nov 30, 2022
53ebde0
Update user_data.sh
etaques Nov 30, 2022
1ff26d3
Update user_data.sh
etaques Nov 30, 2022
6518434
Update vars.tf
etaques Nov 30, 2022
c2b0e60
Update user_data.sh
etaques Nov 30, 2022
3eac9b7
test pktvisor changelog
etaques Dec 1, 2022
9c0daca
test changelog post on slack
etaques Dec 1, 2022
d7133e9
test post slack message
etaques Dec 1, 2022
870caaa
test changelog
etaques Dec 1, 2022
73a3c6f
test slack post
etaques Dec 1, 2022
8b2b13d
test to forma message
etaques Dec 2, 2022
bb41a54
Format slack changelog
etaques Dec 2, 2022
1db52f8
collect binary to store on release
etaques Dec 6, 2022
d1d01d9
test
etaques Dec 6, 2022
4a4abad
packing binary as zip
etaques Dec 6, 2022
2dc7c0e
add zip
etaques Dec 6, 2022
bc7a056
Update user_data.sh
etaques Dec 6, 2022
03cdb46
Update user_data.sh
etaques Dec 6, 2022
3f37234
back to normal
etaques Dec 6, 2022
0c9260f
back
etaques Dec 6, 2022
34e01d6
fix ami image
etaques Dec 6, 2022
35793aa
add script
etaques Dec 6, 2022
ba46b5d
add binaries on release
etaques Dec 6, 2022
725b463
[FIX] permission on script
Dec 6, 2022
0d5fbcc
fix permission
etaques Dec 7, 2022
781e274
last ajusts
etaques Dec 7, 2022
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
6 changes: 3 additions & 3 deletions .github/actions/build-cpp/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ function build() {
cp -rf /github/workspace/conanfile.txt /pktvisor-src/
mkdir /tmp/build
cd /tmp/build
conan profile new --detect default && \
conan profile update settings.compiler.libcxx=libstdc++11 default && \
conan profile new --detect default
conan profile update settings.compiler.libcxx=libstdc++11 default
conan config set general.revisions_enabled=1
PKG_CONFIG_PATH=/local/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=$INPUT_BUILD_TYPE -DASAN=$INPUT_ASAN /pktvisor-src && \
PKG_CONFIG_PATH=/local/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=$INPUT_BUILD_TYPE -DASAN=$INPUT_ASAN /pktvisor-src
make all -j 4
}

Expand Down
4 changes: 2 additions & 2 deletions .github/hosted-runner/amd64/user_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apt-get update -y
apt-get install apt-transport-https qemu qemu-user-static ca-certificates gnupg2 curl tar software-properties-common build-essential zlib1g-dev \
libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev python3 python3-pip python3-dev python xvfb \
libfontconfig1 libfreetype6 xfonts-scalable fonts-liberation fonts-noto-cjk g++-10-arm-linux-gnueabihf g++-10-multilib-arm-linux-gnueabihf \
gcc-10-arm-linux-gnueabihf gcc-10-arm-linux-gnueabihf-base gcc-10-multilib-arm-linux-gnueabihf python3-venv tcpreplay docker.io containerd cmake -y
gcc-10-arm-linux-gnueabihf gcc-10-arm-linux-gnueabihf-base gcc-10-multilib-arm-linux-gnueabihf python3-venv tcpreplay docker.io containerd cmake zip -y

#set permission to use docker
usermod -aG docker ubuntu
Expand All @@ -21,6 +21,6 @@ chown ubuntu.ubuntu /actions-runner -R
#extract git actions runner installer
/bin/su -c "cd /actions-runner && tar xzf ./actions-runner-linux-x64-2.296.2.tar.gz" - ubuntu >> /home/ubuntu/user-data.log

/bin/su -c "cd /actions-runner && ./config.sh --unattended --url https://github.com/ns1labs/pktvisor --token RUNNER_TOKEN --name AMD64_RUNNER --work _work --runasservice" - ubuntu >> /home/ubuntu/user-data.log
/bin/su -c "cd /actions-runner && ./config.sh --unattended --url https://github.com/ns1labs/pktvisor --token RUNNER_TOKEN --name AMD64_RUNNER --labels RUNNER_LABEL --work _work --runasservice" - ubuntu >> /home/ubuntu/user-data.log

/bin/su -c "cd /actions-runner && ./run.sh" - ubuntu >> /home/ubuntu/user-data.log
20 changes: 20 additions & 0 deletions .github/hosted-runner/arm32/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
resource "aws_instance" "orb-devops" {
ami = lookup(var.amis, var.aws_region)
instance_type = var.instance_type
security_groups = [aws_security_group.sg_SelfRunner_arm32.id]
key_name = var.key_name
user_data = file("user_data.sh")
associate_public_ip_address = true
subnet_id = "subnet-0e4137bca8a8a81da"

ebs_block_device {
device_name = "/dev/sda1"
volume_size = 20
}

tags = {
Name = "orb-pktvisor-self-runner-${var.environment}"
Provider = "terraform"
Role = "test"
}
}
3 changes: 3 additions & 0 deletions .github/hosted-runner/arm32/output.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output "ip" {
value = aws_instance.orb-devops.public_ip
}
5 changes: 5 additions & 0 deletions .github/hosted-runner/arm32/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
provider "aws" {
access_key = var.aws_access_key
secret_key = var.aws_secret_key
region = var.aws_region
}
32 changes: 32 additions & 0 deletions .github/hosted-runner/arm32/security-group.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
resource "aws_security_group" "sg_SelfRunner_arm32" {
name = "sg_pktvisor_SelfRunner_arm32_${var.environment}"
description = "Allow all outbound traffic and inbound 22/80"
vpc_id = "vpc-0cd4a525c008d8d71"

ingress {
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}

ingress {
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}

egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}

tags = {
Name = "SelfRunner_arm32_${var.environment}"
Provisioner = "terraform"

}
}
26 changes: 26 additions & 0 deletions .github/hosted-runner/arm32/user_data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

#installing packages
apt-get update -y
apt-get install apt-transport-https qemu qemu-user-static ca-certificates gnupg2 curl tar software-properties-common build-essential zlib1g-dev \
libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev python3 python3-pip python3-dev python xvfb \
libfontconfig1 libfreetype6 xfonts-scalable fonts-liberation fonts-noto-cjk g++-10-arm-linux-gnueabihf g++-10-multilib-arm-linux-gnueabihf \
gcc-10-arm-linux-gnueabihf gcc-10-arm-linux-gnueabihf-base gcc-10-multilib-arm-linux-gnueabihf python3-venv tcpreplay docker.io containerd cmake zip -y

#set permission to use docker
usermod -aG docker ubuntu

#creating directory git actions runner
mkdir actions-runner && cd actions-runner

chown ubuntu.ubuntu /actions-runner -R

#get git actions self-runner
/bin/su -c "cd /actions-runner && curl -o actions-runner-linux-x64-2.296.2.tar.gz -L https://github.com/actions/runner/releases/download/v2.296.2/actions-runner-linux-x64-2.296.2.tar.gz" - ubuntu >> /home/ubuntu/user-data.log

#extract git actions runner installer
/bin/su -c "cd /actions-runner && tar xzf ./actions-runner-linux-x64-2.296.2.tar.gz" - ubuntu >> /home/ubuntu/user-data.log

/bin/su -c "cd /actions-runner && ./config.sh --unattended --url https://github.com/ns1labs/pktvisor --token RUNNER_TOKEN --name AMD64_RUNNER --labels RUNNER_LABEL --work _work --runasservice" - ubuntu >> /home/ubuntu/user-data.log

/bin/su -c "cd /actions-runner && ./run.sh" - ubuntu >> /home/ubuntu/user-data.log
29 changes: 29 additions & 0 deletions .github/hosted-runner/arm32/vars.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
variable "aws_access_key" {
default = "AWSID"
}
variable "aws_secret_key" {
default = "AWSSECRET"
}

variable "environment" {
default = "ENVIRONMENT"
}

variable "aws_region" {
default = "us-east-1"
}

variable "amis" {
type = map
default = {
us-east-1 = "ami-070650c005cce4203" //ubuntu 20.04 arm64 on us-east-1
}
}

variable "key_name" {
default = "devops-key"
}

variable "instance_type" {
default = "t3.xlarge"
}
4 changes: 2 additions & 2 deletions .github/hosted-runner/arm64/user_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apt-get update -y
apt-get install apt-transport-https qemu qemu-user-static ca-certificates gnupg2 curl tar software-properties-common build-essential zlib1g-dev \
libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev python3 python3-pip python3-dev python2 xvfb \
libfontconfig1 libfreetype6 xfonts-scalable fonts-liberation fonts-noto-cjk g++-10-arm-linux-gnueabihf cmake \
gcc-10-arm-linux-gnueabihf gcc-10-arm-linux-gnueabihf-base python3-venv tcpreplay docker.io containerd -y
gcc-10-arm-linux-gnueabihf gcc-10-arm-linux-gnueabihf-base python3-venv tcpreplay docker.io containerd zip -y

#set permission to use docker
usermod -aG docker ubuntu
Expand All @@ -21,6 +21,6 @@ chown ubuntu.ubuntu /actions-runner -R
#extract git actions runner installer
/bin/su -c "cd /actions-runner && tar xzf ./actions-runner-linux-arm64-2.294.0.tar.gz" - ubuntu >> /home/ubuntu/user-data.log

/bin/su -c "cd /actions-runner && ./config.sh --unattended --url https://github.com/ns1labs/pktvisor --token RUNNER_TOKEN --name ARM64_RUNNER --work _work --runasservice" - ubuntu >> /home/ubuntu/user-data.log
/bin/su -c "cd /actions-runner && ./config.sh --unattended --url https://github.com/ns1labs/pktvisor --token RUNNER_TOKEN --name ARM64_RUNNER --labels RUNNER_LABEL --work _work --runasservice" - ubuntu >> /home/ubuntu/user-data.log

/bin/su -c "cd /actions-runner && ./run.sh" - ubuntu >> /home/ubuntu/user-data.log
Loading