Skip to content

Commit 3dd18b8

Browse files
committed
made stuff better
1 parent e534b65 commit 3dd18b8

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

ec2/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,9 @@ $ tofu apply
7575
`tofu apply` will create all the needed resources in your AWS account, this might take 15-20 minutes. The script will output important information including the load balancer DNS name and bastion host IP.
7676

7777
### Using the cluster
78-
The script will generate a `outputs/cluster_setup.u` file that that contains a `ClientConfig` which you can use to deploy services and
79-
run jobs against your cluster.
80-
81-
You can save this output into your scratch file, or load this file into a ucm session with `> load /path/to/outputs/cluster_setup.u`. and then you should be able to `> run myJob` to launch a job on your new cluster!
78+
The script will generate a `outputs/cluster_config.u` file that that contains a `ClientConfig` which you can use to deploy services and run jobs against your cluster.
8279

80+
You can save this output into your scratch file, or load this file into a ucm session with `> load /path/to/outputs/cluster_config.u`. and then you should be able to `> run sampleJob` which will attempt to launch a job on your cluster.
8381

8482
## Tearing down the infrastructure
8583

ec2/outputs.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ output "unison_public_endpoint_https" {
1919
description = "Public HTTPS endpoint for Unison Cloud API (with self-signed cert)"
2020
}
2121

22-
resource "local_file" "cluster_setup_script" {
23-
filename = "${path.module}/outputs/cluster-setup.u"
22+
resource "local_file" "cluster_config_script" {
23+
filename = "${path.module}/outputs/cluster-config.u"
2424
content = <<EOF
2525
{{
2626
In order to connect to your cluster, You'll need to use a custom cluster config:
@@ -41,16 +41,16 @@ clusterConfig = do
4141
-- Instead of calling Cloud.run, which, by default, targets the Unison public cluster,
4242
-- use Cloud.run.withConfig to target your own cluster:
4343
44-
myJob = do Cloud.run.withConfig clusterConfig() do
44+
sampleJob = do Cloud.run.withConfig clusterConfig() do
4545
env = default()
4646
two = submit env do
4747
1 + 1
4848
printLine ("remotely calculated: 1 + 1 = " ++ (Nat.toText two))
4949
EOF
5050
}
5151

52-
output "cluster_setup_u" {
52+
output "cluster_config_u" {
5353
sensitive = false
5454
description = "Unison script to connect to your cluster"
55-
value = local_file.cluster_setup_script.content
55+
value = local_file.cluster_config_script.content
5656
}

eks/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,9 @@ $ tofu apply
7777
`tofu apply` will create all the needed resources in your AWS account, this might take 20-30 minutes. Upon successful completion, `tofu apply` will display all out the "outputs" which can later be retrieved by running `tofu output`.
7878

7979
### Using the cluster
80-
The script will generate a `outputs/cluster_setup.u` file that that contains a `ClientConfig` which you can use to deploy services and
81-
run jobs against your cluster.
80+
The script will generate a `outputs/cluster_config.u` file that that contains a `ClientConfig` which you can use to deploy services and run jobs against your cluster.
8281

83-
You can save this output into your scratch file, or load this file into a ucm session with `> load /path/to/outputs/cluster_setup.u`. and then you should be able to `> run myJob` to launch a job on your new cluster!
82+
You can save this output into your scratch file, or load this file into a ucm session with `> load /path/to/outputs/cluster_config.u`. and then you should be able to `> run sampleJob` which will attempt to launch a job on your cluster.
8483

8584
<details>
8685
<summary>Connecting to the EKS Cluster with kubectl</summary>

eks/outputs.tf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ EOF
1515
}
1616

1717
resource "local_file" "cluster_setup_script" {
18-
filename = "${path.module}/outputs/cluster-setup.u"
18+
filename = "${path.module}/outputs/cluster-config.u"
1919
content = <<EOF
2020
{{
21-
In order to connect to your cluster, You'll need to use a custom cluster config:
21+
In order to connect to your cluster, You'll need to use a custom cluster config
2222
}}
2323
2424
clusterConfig = do
@@ -36,11 +36,13 @@ clusterConfig = do
3636
-- Instead of calling Cloud.run, which, by default, targets the Unison public cluster,
3737
-- use Cloud.run.withConfig to target your own cluster:
3838
39-
myJob = do Cloud.run.withConfig clusterConfig() do
39+
sampleJob = do Cloud.run.withConfig clusterConfig() do
4040
env = default()
4141
two = submit env do
4242
1 + 1
4343
printLine ("remotely calculated: 1 + 1 = " ++ (Nat.toText two))
44+
45+
4446
EOF
4547
}
4648

0 commit comments

Comments
 (0)