Skip to content

Commit 788dd9c

Browse files
committed
Add tailscale to arm64
1 parent 499f552 commit 788dd9c

File tree

1 file changed

+48
-31
lines changed

1 file changed

+48
-31
lines changed

cookbooks/boxcutter_builder/recipes/default.rb

Lines changed: 48 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,58 @@
2020

2121
if node.aws?
2222
aws_arm64_github_self_hosted_runner_list = [
23-
'ip-10-0-1-70', # arm64 builder
23+
'ip-10-0-1-147', # arm64 builder
2424
]
2525

2626
if aws_arm64_github_self_hosted_runner_list.include?(node['hostname'])
27-
include_recipe 'boxcutter_users::default'
28-
include_recipe 'boxcutter_docker::default'
29-
30-
include_recipe 'boxcutter_github::runner_user'
31-
node.default['fb_users']['groups']['docker']['members'] << 'github-runner'
32-
node.default['fb_ssh']['authorized_keys_users'] << 'github-runner'
33-
34-
node.default['fb_ssh']['authorized_keys']['github-runner']['aws-arm64-github-runner'] = \
35-
Boxcutter::OnePassword.op_read('op://Automation-Org/craft SSH Key/public key')
36-
37-
directory '/home/github-runner/.ssh' do
38-
owner 'github-runner'
39-
group 'github-runner'
40-
mode '0700'
41-
end
42-
43-
ssh_known_hosts_entry 'github.com' do
44-
file_location '/home/github-runner/.ssh/known_hosts'
45-
owner 'github-runner'
46-
group 'github-runner'
47-
end
48-
49-
craft_rsa_ssh_key_private = \
50-
Boxcutter::OnePassword.op_read('op://Automation-Org/craft SSH Key/private key')
27+
# op item get 'tailscale oauth automation-sandbox-write-blue' --vault Automation-Sandbox
28+
# op item get v5zvz2gomyzhgow46esj7txneu --format json
29+
tailscale_oauth_client_id_write_blue =\
30+
Boxcutter::OnePassword.op_read('op://Automation-Org/tailscale oauth write blue/username')
31+
tailscale_oauth_client_secret_write_blue = \
32+
Boxcutter::OnePassword.op_read('op://Automation-Org/tailscale oauth write blue/credential')
33+
node.run_state['boxcutter_tailscale'] ||= {}
34+
node.run_state['boxcutter_tailscale']['oauth_client_id'] = tailscale_oauth_client_id_write_blue
35+
node.run_state['boxcutter_tailscale']['oauth_client_secret'] = tailscale_oauth_client_secret_write_blue
36+
node.default['boxcutter_tailscale']['enable'] = true
37+
node.default['boxcutter_tailscale']['ephemeral'] = false
38+
node.default['boxcutter_tailscale']['use_tailscale_dns'] = false
39+
node.default['boxcutter_tailscale']['shields_up'] = false
40+
node.default['boxcutter_tailscale']['hostname'] = 'aws-boxcutter-arm64-github-runner'
41+
node.default['boxcutter_tailscale']['tags'] = ['chef']
42+
include_recipe 'boxcutter_tailscale::default'
5143

52-
file '/home/github-runner/.ssh/id_rsa' do
53-
owner 'github-runner'
54-
group 'github-runner'
55-
mode '0600'
56-
content craft_rsa_ssh_key_private
57-
end
44+
# include_recipe 'boxcutter_users::default'
45+
# include_recipe 'boxcutter_docker::default'
46+
#
47+
# include_recipe 'boxcutter_github::runner_user'
48+
# node.default['fb_users']['groups']['docker']['members'] << 'github-runner'
49+
# node.default['fb_ssh']['authorized_keys_users'] << 'github-runner'
50+
#
51+
# node.default['fb_ssh']['authorized_keys']['github-runner']['aws-arm64-github-runner'] = \
52+
# Boxcutter::OnePassword.op_read('op://Automation-Org/craft SSH Key/public key')
53+
#
54+
# directory '/home/github-runner/.ssh' do
55+
# owner 'github-runner'
56+
# group 'github-runner'
57+
# mode '0700'
58+
# end
59+
#
60+
# ssh_known_hosts_entry 'github.com' do
61+
# file_location '/home/github-runner/.ssh/known_hosts'
62+
# owner 'github-runner'
63+
# group 'github-runner'
64+
# end
65+
#
66+
# craft_rsa_ssh_key_private = \
67+
# Boxcutter::OnePassword.op_read('op://Automation-Org/craft SSH Key/private key')
68+
#
69+
# file '/home/github-runner/.ssh/id_rsa' do
70+
# owner 'github-runner'
71+
# group 'github-runner'
72+
# mode '0600'
73+
# content craft_rsa_ssh_key_private
74+
# end
5875
end
5976

6077
aws_amd64_github_self_host_runner_list = [

0 commit comments

Comments
 (0)