File tree Expand file tree Collapse file tree 3 files changed +23
-12
lines changed Expand file tree Collapse file tree 3 files changed +23
-12
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,17 @@ chmod +x /usr/libexec/docker/cli-plugins/docker-compose
9
9
10
10
docker pull netboxlabs/orb-agent:latest
11
11
12
- mkdir /opt/orb
13
- cd /opt/orb
12
+ cd /root
14
13
15
14
cat << 'EOF ' > orb.yaml
16
15
${orb_yaml}
17
16
EOF
18
17
19
- echo " docker run -u root -v /opt/orb:/opt/orb/ netboxlabs/orb-agent:latest run -c /opt/orb/orb.yaml" > /opt/orb/scan.sh
20
- chmod +x /opt/orb/scan.sh
18
+ cat << 'EOF ' > scan.sh
19
+ docker run -u root -v /root:/opt/orb/ \
20
+ -e DIODE_CLIENT_ID=$${DIODE_CLIENT_ID} \
21
+ -e DIODE_CLIENT_SECRET=$${DIODE_CLIENT_SECRET} \
22
+ netboxlabs/orb-agent:latest run -c /opt/orb/orb.yaml
23
+ EOF
24
+
25
+ chmod +x scan.sh
Original file line number Diff line number Diff line change @@ -29,11 +29,16 @@ resource "aws_iam_instance_profile" "orb_instance_profile" {
29
29
}
30
30
31
31
resource "aws_instance" "orb_instance" {
32
- ami = data. aws_ssm_parameter . al2023_ami_arm64 . value
33
- instance_type = " t4g.large"
34
- subnet_id = module. vpc . public_subnets [0 ]
35
- vpc_security_group_ids = [aws_security_group . nbc . id ]
36
- user_data = templatefile (" ${ path . module } /orb.sh.tpl" , { orb_yaml = templatefile (" ${ path . module } /orb.yaml.tpl" , { diode_server = aws_instance.nbe_instance.private_ip }) })
32
+ ami = data. aws_ssm_parameter . al2023_ami_arm64 . value
33
+ instance_type = " t4g.large"
34
+ subnet_id = module. vpc . public_subnets [0 ]
35
+ vpc_security_group_ids = [aws_security_group . nbc . id ]
36
+ user_data = templatefile (" ${ path . module } /orb.sh.tpl" , {
37
+ orb_yaml = templatefile (" ${ path . module } /orb.yaml.tpl" , {
38
+ diode_server = aws_instance.nbe_instance.private_ip,
39
+ public_subnet = module.vpc.public_subnet_objects[0 ].cidr_block
40
+ })
41
+ })
37
42
associate_public_ip_address = true
38
43
iam_instance_profile = aws_iam_instance_profile. orb_instance_profile . name
39
44
}
Original file line number Diff line number Diff line change 6
6
common:
7
7
diode:
8
8
target: grpc://${ diode_server} :80/diode
9
- client_id: FIXME
10
- client_secret: FIXME
9
+ client_id: $$ { DIODE_CLIENT_ID }
10
+ client_secret: $$ { DIODE_CLIENT_SECRET }
11
11
agent_name: orb1
12
12
policies:
13
13
network_discovery:
14
14
public_subnets:
15
15
config:
16
16
scope:
17
17
targets:
18
- - 10.0.1.0/24
18
+ - ${ public_subnet}
19
+ fast_mode: True
You can’t perform that action at this time.
0 commit comments