Skip to content

Commit

Permalink
Update ubuntu version and add python requirements.txt in build
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Kincaid <[email protected]>
  • Loading branch information
Benjamin Kincaid authored and Ben Kincaid committed Jun 23, 2022
1 parent 6d8265f commit e1e7e55
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/test-controller-agent/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ data "aws_ami" "agent" {

filter {
name = "name"
values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"]
values = ["ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20220528"]
}

filter {
Expand Down
4 changes: 3 additions & 1 deletion modules/test-controller-agent/templates/init.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packages:
- iproute2
- linux-tools-common
- linux-tools-generic
- linux-tools-5.4.0-1037-aws
- linux-tools-5.15.0-1009-aws
- iperf
- gdb
- libpcap-dev
Expand Down Expand Up @@ -87,7 +87,9 @@ runcmd:
- amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c ssm:AmazonCloudWatch-Config.json -s
- /root/update-networking.sh
- aws --region ${REGION} --endpoint-url ${S3_INTERFACE_ENDPOINT} s3 cp s3://${BINARIES_S3_BUCKET}/${S3_BUCKET_PREFIX}/agent-latest /root/agent
- aws --region ${REGION} --endpoint-url ${S3_INTERFACE_ENDPOINT} s3 cp s3://${BINARIES_S3_BUCKET}/${S3_BUCKET_PREFIX}/requirements.txt /root/requirements.txt
- chmod +x /root/agent
- pip3 install -r /root/requirements.txt
- systemctl daemon-reload
- systemctl start cbdc-test-agent.service
- devname=`ip -o link show | awk '{ if ( $9 == "UP"){ print substr($2, 1, length($2)-1) } }'`; maxrx=`ethtool -g $devname | grep 'RX:' | head -1 | awk '{print $2}'`; currentrx=`ethtool -g $devname | grep 'RX:' | tail -1 | awk '{print $2}'`;currenttx=`ethtool -g $devname | grep 'TX:' | tail -1 | awk '{print $2}'`;maxtx=`ethtool -g $devname | grep 'TX:' | head -1 | awk '{print $2}'`; ethtool -G $devname rx $maxrx tx $currenttx
5 changes: 4 additions & 1 deletion modules/test-controller-deploy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,11 @@ phases:
- docker tag agent:latest agent:$CODEBUILD_RESOLVED_SOURCE_VERSION
- docker container create --name temp agent:latest
- docker container cp temp:/app/agent ./agent-latest
- docker container cp temp:/app/requirements.txt ./requirements.txt
artifacts:
files:
- agent-latest
- requirements.txt
BUILDSPEC
}

Expand Down Expand Up @@ -526,8 +528,9 @@ phases:
docker: 18
build:
commands:
- echo Uploading binary to S3...
- echo Uploading binary and requirements.txt to S3...
- aws --endpoint-url $S3_INTERFACE_ENDPOINT s3 cp ./agent-latest s3://$S3_BUCKET/test-controller-agent/
- aws --endpoint-url $S3_INTERFACE_ENDPOINT s3 cp ./requirements.txt s3://$S3_BUCKET/test-controller-agent/
BUILDSPEC
}
Expand Down

0 comments on commit e1e7e55

Please sign in to comment.