Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 6 additions & 0 deletions contrib/digitalocean/petri_docker.pkr.hcl.example
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ build {
"chown root:docker /docker_volumes",
"sudo sed -i.bak 's/^CUSTOM_ARGS.*/CUSTOM_ARGS=\"--stability.level experimental\"/' /etc/default/alloy",

# SSH - disable password authentication
"sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config",
"sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config",
"systemctl restart ssh",

"cloud-init clean --logs",
]
}
Expand All @@ -91,4 +96,5 @@ build {
source = "files/enabled_ipv4_forwarding.conf"
destination = "/etc/sysctl.d/enabled_ipv4_forwarding.conf"
}

}
9 changes: 4 additions & 5 deletions core/provider/digitalocean/droplet.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ func (p *Provider) CreateDroplet(ctx context.Context, definition provider.TaskDe
userDataCommands = append(userDataCommands, telemetryCommand...)
}

userDataCommands = append(userDataCommands, "sudo sed -i.bak 's/^root:.*/root:*:16231:0:99999:7:::/' /etc/shadow")

state := p.GetState()
req := &godo.DropletCreateRequest{
Name: fmt.Sprintf("%s-%s", state.PetriTag, definition.Name),
Region: doConfig["region"],
Size: doConfig["size"],
Name: fmt.Sprintf("%s-%s", state.PetriTag, definition.Name),
Region: doConfig["region"],
Size: doConfig["size"],
SSHKeys: []godo.DropletCreateSSHKey{{ID: 50241382}},
Image: godo.DropletCreateImage{
ID: int(imageId),
},
Expand Down
Loading