File tree Expand file tree Collapse file tree 12 files changed +318
-56
lines changed Expand file tree Collapse file tree 12 files changed +318
-56
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ function build() {
20
20
cp -rf /github/workspace/conanfile.txt /pktvisor-src/
21
21
mkdir /tmp/build
22
22
cd /tmp/build
23
- conan profile new --detect default && \
24
- conan profile update settings.compiler.libcxx=libstdc++11 default && \
23
+ conan profile new --detect default
24
+ conan profile update settings.compiler.libcxx=libstdc++11 default
25
25
conan config set general.revisions_enabled=1
26
- PKG_CONFIG_PATH=/local/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=$INPUT_BUILD_TYPE -DASAN=$INPUT_ASAN /pktvisor-src && \
26
+ PKG_CONFIG_PATH=/local/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=$INPUT_BUILD_TYPE -DASAN=$INPUT_ASAN /pktvisor-src
27
27
make all -j 4
28
28
}
29
29
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ apt-get update -y
5
5
apt-get install apt-transport-https qemu qemu-user-static ca-certificates gnupg2 curl tar software-properties-common build-essential zlib1g-dev \
6
6
libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev python3 python3-pip python3-dev python xvfb \
7
7
libfontconfig1 libfreetype6 xfonts-scalable fonts-liberation fonts-noto-cjk g++-10-arm-linux-gnueabihf g++-10-multilib-arm-linux-gnueabihf \
8
- 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
8
+ 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
9
9
10
10
# set permission to use docker
11
11
usermod -aG docker ubuntu
@@ -21,6 +21,6 @@ chown ubuntu.ubuntu /actions-runner -R
21
21
# extract git actions runner installer
22
22
/bin/su -c " cd /actions-runner && tar xzf ./actions-runner-linux-x64-2.296.2.tar.gz" - ubuntu >> /home/ubuntu/user-data.log
23
23
24
- /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
24
+ /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
25
25
26
26
/bin/su -c " cd /actions-runner && ./run.sh" - ubuntu >> /home/ubuntu/user-data.log
Original file line number Diff line number Diff line change
1
+ resource "aws_instance" "orb-devops" {
2
+ ami = lookup (var. amis , var. aws_region )
3
+ instance_type = var. instance_type
4
+ security_groups = [aws_security_group . sg_SelfRunner_arm32 . id ]
5
+ key_name = var. key_name
6
+ user_data = file (" user_data.sh" )
7
+ associate_public_ip_address = true
8
+ subnet_id = " subnet-0e4137bca8a8a81da"
9
+
10
+ ebs_block_device {
11
+ device_name = " /dev/sda1"
12
+ volume_size = 20
13
+ }
14
+
15
+ tags = {
16
+ Name = " orb-pktvisor-self-runner-${ var . environment } "
17
+ Provider = " terraform"
18
+ Role = " test"
19
+ }
20
+ }
Original file line number Diff line number Diff line change
1
+ output "ip" {
2
+ value = aws_instance. orb-devops . public_ip
3
+ }
Original file line number Diff line number Diff line change
1
+ provider "aws" {
2
+ access_key = var. aws_access_key
3
+ secret_key = var. aws_secret_key
4
+ region = var. aws_region
5
+ }
Original file line number Diff line number Diff line change
1
+ resource "aws_security_group" "sg_SelfRunner_arm32" {
2
+ name = " sg_pktvisor_SelfRunner_arm32_${ var . environment } "
3
+ description = " Allow all outbound traffic and inbound 22/80"
4
+ vpc_id = " vpc-0cd4a525c008d8d71"
5
+
6
+ ingress {
7
+ from_port = 22
8
+ to_port = 22
9
+ protocol = " tcp"
10
+ cidr_blocks = [" 0.0.0.0/0" ]
11
+ }
12
+
13
+ ingress {
14
+ from_port = 80
15
+ to_port = 80
16
+ protocol = " tcp"
17
+ cidr_blocks = [" 0.0.0.0/0" ]
18
+ }
19
+
20
+ egress {
21
+ from_port = 0
22
+ to_port = 0
23
+ protocol = " -1"
24
+ cidr_blocks = [" 0.0.0.0/0" ]
25
+ }
26
+
27
+ tags = {
28
+ Name = " SelfRunner_arm32_${ var . environment } "
29
+ Provisioner = " terraform"
30
+
31
+ }
32
+ }
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # installing packages
4
+ apt-get update -y
5
+ apt-get install apt-transport-https qemu qemu-user-static ca-certificates gnupg2 curl tar software-properties-common build-essential zlib1g-dev \
6
+ libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev python3 python3-pip python3-dev python xvfb \
7
+ libfontconfig1 libfreetype6 xfonts-scalable fonts-liberation fonts-noto-cjk g++-10-arm-linux-gnueabihf g++-10-multilib-arm-linux-gnueabihf \
8
+ 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
9
+
10
+ # set permission to use docker
11
+ usermod -aG docker ubuntu
12
+
13
+ # creating directory git actions runner
14
+ mkdir actions-runner && cd actions-runner
15
+
16
+ chown ubuntu.ubuntu /actions-runner -R
17
+
18
+ # get git actions self-runner
19
+ /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
20
+
21
+ # extract git actions runner installer
22
+ /bin/su -c " cd /actions-runner && tar xzf ./actions-runner-linux-x64-2.296.2.tar.gz" - ubuntu >> /home/ubuntu/user-data.log
23
+
24
+ /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
25
+
26
+ /bin/su -c " cd /actions-runner && ./run.sh" - ubuntu >> /home/ubuntu/user-data.log
Original file line number Diff line number Diff line change
1
+ variable "aws_access_key" {
2
+ default = " AWSID"
3
+ }
4
+ variable "aws_secret_key" {
5
+ default = " AWSSECRET"
6
+ }
7
+
8
+ variable "environment" {
9
+ default = " ENVIRONMENT"
10
+ }
11
+
12
+ variable "aws_region" {
13
+ default = " us-east-1"
14
+ }
15
+
16
+ variable "amis" {
17
+ type = map
18
+ default = {
19
+ us-east-1 = " ami-070650c005cce4203" // ubuntu 20.04 arm64 on us-east-1
20
+ }
21
+ }
22
+
23
+ variable "key_name" {
24
+ default = " devops-key"
25
+ }
26
+
27
+ variable "instance_type" {
28
+ default = " t3.xlarge"
29
+ }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ apt-get update -y
5
5
apt-get install apt-transport-https qemu qemu-user-static ca-certificates gnupg2 curl tar software-properties-common build-essential zlib1g-dev \
6
6
libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev python3 python3-pip python3-dev python2 xvfb \
7
7
libfontconfig1 libfreetype6 xfonts-scalable fonts-liberation fonts-noto-cjk g++-10-arm-linux-gnueabihf cmake \
8
- gcc-10-arm-linux-gnueabihf gcc-10-arm-linux-gnueabihf-base python3-venv tcpreplay docker.io containerd -y
8
+ gcc-10-arm-linux-gnueabihf gcc-10-arm-linux-gnueabihf-base python3-venv tcpreplay docker.io containerd zip -y
9
9
10
10
# set permission to use docker
11
11
usermod -aG docker ubuntu
@@ -21,6 +21,6 @@ chown ubuntu.ubuntu /actions-runner -R
21
21
# extract git actions runner installer
22
22
/bin/su -c " cd /actions-runner && tar xzf ./actions-runner-linux-arm64-2.294.0.tar.gz" - ubuntu >> /home/ubuntu/user-data.log
23
23
24
- /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
24
+ /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
25
25
26
26
/bin/su -c " cd /actions-runner && ./run.sh" - ubuntu >> /home/ubuntu/user-data.log
You can’t perform that action at this time.
0 commit comments