@@ -34,14 +34,12 @@ struct configureBastion: AsyncParsableCommand {
3434 try await engine. run (
3535 host: bastionHost, displayProgress: true , detailLevel: detailLevel,
3636 commands: [
37- SSHCommand ( " uname -a " ) , // uses CitadelSSH
38- SSHCommand ( " ls -altr " ) ,
39-
4037 ShellCommand ( " mkdir -p ~/.ssh " ) , // uses Process and forked 'ssh' locally
4138 ShellCommand ( " chmod 0700 ~/.ssh " ) ,
4239 CopyInto ( location: " ~/.ssh/ \( keyName) " , from: privateKeyLocation) ,
4340 CopyInto ( location: " ~/.ssh/ \( keyName) .pub " , from: " \( privateKeyLocation) .pub " ) ,
4441 ShellCommand ( " chmod 0600 ~/.ssh/ \( keyName) " ) ,
42+
4543 // CopyFrom(into: "swiftly-install.sh", from: URL(string: "https://swiftlang.github.io/swiftly/swiftly-install.sh")!),
4644 // ShellCommand("chmod 0755 swiftly-install.sh"),
4745 // released version (0.3.0) doesn't support Ubuntu 24.04 - that's pending in 0.4.0...
@@ -54,10 +52,10 @@ struct configureBastion: AsyncParsableCommand {
5452 ShellCommand ( " sudo apt-get update -q " , env: debUnattended) ,
5553 ShellCommand ( " sudo apt-get upgrade -y -qq " , env: debUnattended) ,
5654
57- // latest upgrade looks like it _doesn't_ require a reboot to complete its work.
58- // ShellCommand("sudo reboot"),
59- // VerifyAccess(ignoreFailure: false,
60- // retry: Backoff(maxRetries: 10, strategy: .fibonacci(maxDelay: .seconds(10)))),
55+ // A reboot and "wait for it" to resume setup:
56+ // ShellCommand("sudo reboot"),
57+ // VerifyAccess(ignoreFailure: false,
58+ // retry: Backoff(maxRetries: 10, strategy: .fibonacci(maxDelay: .seconds(10)))),
6159
6260 // "manual install" of Swift
6361 // from https://www.swift.org/install/linux/tarball/ for Ubuntu 24.04
@@ -82,18 +80,14 @@ struct configureBastion: AsyncParsableCommand {
8280 // restart the unattended upgrades
8381 ShellCommand ( " sudo systemctl start unattended-upgrades.service " ) ,
8482
85- // yes, I know about Swiftly, but when I'm creating this it wasn't available
86- // on swift.org and the released version wasn't yet supporting Ubuntu 24.04.
87-
8883 ShellCommand (
8984 " wget -nv https://download.swift.org/swift-6.0.3-release/ubuntu2404/swift-6.0.3-RELEASE/swift-6.0.3-RELEASE-ubuntu24.04.tar.gz "
9085 ) ,
91- // ~17 seconds
86+
9287 ShellCommand ( " tar xzf swift-6.0.3-RELEASE-ubuntu24.04.tar.gz " ) ,
93- // ~43 seconds
88+
9489 ShellCommand ( " swift-6.0.3-RELEASE-ubuntu24.04/usr/bin/swift -version " ) ,
9590
96- // reboot to full apply pending updates
9791 ShellCommand ( " sudo reboot " ) ,
9892 ] )
9993 }
0 commit comments