adaptation to hero

This commit is contained in:
Mik-TF
2024-06-13 15:50:44 -04:00
parent 6e79c5277b
commit 9432a3e845
29 changed files with 593 additions and 135 deletions

View File

@@ -277,7 +277,7 @@ resources:
outputs:
node_deployment_id: ${deployment.node_deployment_id}
ygg_ip: ${deployment.vms_computed[0].ygg_ip}
planetary_ip: ${deployment.vms_computed[0].planetary_ip}
```
We have a scheduler, and a network just like before. But now, we also have a deployment `grid:internal:Deployment` object that can have one or more disks and virtual machines.
@@ -357,7 +357,7 @@ We now see how to deploy a [Kubernetes cluster using Pulumi](https://github.com/
outputs:
node_deployment_id: ${kubernetes.node_deployment_id}
ygg_ip: ${kubernetes.master_computed.ygg_ip}
planetary_ip: ${kubernetes.master_computed.planetary_ip}
```
Now, we define the Kubernetes resource `grid:internal:Kubernetes` that has master and workers slice. You define almost everything like a normal VM except for the FLiist. Also note that the token is the `cluster token`. This will ensure that the workers and the master communicate properly.
@@ -435,7 +435,7 @@ Here's an [example](https://github.com/threefoldtech/pulumi-provider-grid/blob/d
node_id: 14
fqdn: mydomain.com
backends:
- http://[${deployment.vms_computed[0].ygg_ip}]:9000
- http://[${deployment.vms_computed[0].planetary_ip}]:9000
```
Here, we informed the gateway that any request coming for the domain `mydomain.com` needs to be balanced through the backends.

View File

@@ -77,15 +77,15 @@ resource "grid_deployment" "d1" {
output "vm1_ip" {
value = grid_deployment.d1.vms[0].ip
}
output "vm1_ygg_ip" {
value = grid_deployment.d1.vms[0].ygg_ip
output "vm1_planetary_ip" {
value = grid_deployment.d1.vms[0].planetary_ip
}
output "vm2_ip" {
value = grid_deployment.d1.vms[1].ip
}
output "vm2_ygg_ip" {
value = grid_deployment.d1.vms[1].ygg_ip
output "vm2_planetary_ip" {
value = grid_deployment.d1.vms[1].planetary_ip
}
```

View File

@@ -237,11 +237,11 @@ output "node1_zmachine2_ip" {
value = grid_deployment.d2.vms[0].ip
}
output "ygg_ip1" {
value = grid_deployment.d1.vms[0].ygg_ip
output "planetary_ip1" {
value = grid_deployment.d1.vms[0].planetary_ip
}
output "ygg_ip2" {
value = grid_deployment.d2.vms[0].ygg_ip
output "planetary_ip2" {
value = grid_deployment.d2.vms[0].planetary_ip
}
output "ipv4_vm1" {

View File

@@ -261,11 +261,11 @@ output "node1_zmachine2_ip" {
value = grid_deployment.d2.vms[0].ip
}
output "ygg_ip1" {
value = grid_deployment.d1.vms[0].ygg_ip
output "planetary_ip1" {
value = grid_deployment.d1.vms[0].planetary_ip
}
output "ygg_ip2" {
value = grid_deployment.d2.vms[0].ygg_ip
output "planetary_ip2" {
value = grid_deployment.d2.vms[0].planetary_ip
}
output "ipv4_vm1" {
@@ -808,11 +808,11 @@ output "node1_zmachine1_ip" {
# value = grid_deployment.d2.vms[0].ip
#}
output "ygg_ip1" {
value = grid_deployment.d1.vms[0].ygg_ip
output "planetary_ip1" {
value = grid_deployment.d1.vms[0].planetary_ip
}
#output "ygg_ip2" {
# value = grid_deployment.d2.vms[0].ygg_ip
#output "planetary_ip2" {
# value = grid_deployment.d2.vms[0].planetary_ip
#}
output "ipv4_vm1" {

View File

@@ -213,8 +213,8 @@ output "node1_zmachine1_ip" {
value = grid_deployment.d1.vms[0].ip
}
output "ygg_ip1" {
value = grid_deployment.d1.vms[0].ygg_ip
output "planetary_ip1" {
value = grid_deployment.d1.vms[0].planetary_ip
}
output "ipv4_vm1" {

View File

@@ -234,19 +234,19 @@ output "client2_wg_ip" {
}
output "server1_planetary_ip" {
value = grid_deployment.d1.vms[0].ygg_ip
value = grid_deployment.d1.vms[0].planetary_ip
}
output "server2_planetary_ip" {
value = grid_deployment.d1.vms[1].ygg_ip
value = grid_deployment.d1.vms[1].planetary_ip
}
output "server3_planetary_ip" {
value = grid_deployment.d1.vms[2].ygg_ip
value = grid_deployment.d1.vms[2].planetary_ip
}
output "client1_planetary_ip" {
value = grid_deployment.d1.vms[3].ygg_ip
value = grid_deployment.d1.vms[3].planetary_ip
}
output "client2_planetary_ip" {
value = grid_deployment.d1.vms[4].ygg_ip
value = grid_deployment.d1.vms[4].planetary_ip
}
```

View File

@@ -61,7 +61,7 @@ resource "grid_deployment" "d1" {
type = "ssh"
user = "root"
agent = true
host = grid_deployment.d1.vms[0].ygg_ip
host = grid_deployment.d1.vms[0].planetary_ip
}
provisioner "remote-exec" {
@@ -88,7 +88,7 @@ resource "grid_deployment" "d1" {
type = "ssh"
user = "root"
agent = true
host = grid_deployment.d1.vms[0].ygg_ip
host = grid_deployment.d1.vms[0].planetary_ip
}
```

View File

@@ -209,11 +209,11 @@ output "node1_zmachine2_ip" {
value = grid_deployment.d2.vms[0].ip
}
output "ygg_ip1" {
value = grid_deployment.d1.vms[0].ygg_ip
output "planetary_ip1" {
value = grid_deployment.d1.vms[0].planetary_ip
}
output "ygg_ip2" {
value = grid_deployment.d2.vms[0].ygg_ip
output "planetary_ip2" {
value = grid_deployment.d2.vms[0].planetary_ip
}
output "ipv4_vm1" {

View File

@@ -136,8 +136,8 @@ resource "grid_deployment" "d0" {
output "wg_config" {
value = grid_network.net0.access_wg_config
}
output "ygg_ip" {
value = grid_deployment.d0.vms[0].ygg_ip
output "planetary_ip" {
value = grid_deployment.d0.vms[0].planetary_ip
}
output "vm_ip" {
value = grid_deployment.d0.vms[0].ip
@@ -427,8 +427,8 @@ resource "grid_deployment" "d2" {
output "wg_config" {
value = grid_network.net2.access_wg_config
}
output "ygg_ip" {
value = grid_deployment.d2.vms[0].ygg_ip
output "planetary_ip" {
value = grid_deployment.d2.vms[0].planetary_ip
}
output "vm_ip" {
value = grid_deployment.d2.vms[0].ip

View File

@@ -181,8 +181,8 @@ resource "grid_deployment" "qsfs" {
output "metrics" {
value = grid_deployment.qsfs.qsfs[0].metrics_endpoint
}
output "ygg_ip" {
value = grid_deployment.qsfs.vms[0].ygg_ip
output "planetary_ip" {
value = grid_deployment.qsfs.vms[0].planetary_ip
}
```

View File

@@ -266,8 +266,8 @@ resource "grid_deployment" "qsfs" {
output "metrics" {
value = grid_deployment.qsfs.qsfs[0].metrics_endpoint
}
output "ygg_ip" {
value = grid_deployment.qsfs.vms[0].ygg_ip
output "planetary_ip" {
value = grid_deployment.qsfs.vms[0].planetary_ip
}
```
@@ -337,7 +337,7 @@ To SSH with Planetary Network, write the following:
ssh root@planetary_IP
```
Note that the IP address should be the value of the parameter **ygg_ip** from the Terraform Outputs.
Note that the IP address should be the value of the parameter **planetary_ip** from the Terraform Outputs.
You now have an SSH connection access to the VM over Planetary Network.

View File

@@ -94,15 +94,15 @@ resource "grid_deployment" "d1" {
output "vm1_ip" {
value = grid_deployment.d1.vms[0].ip
}
output "vm1_ygg_ip" {
value = grid_deployment.d1.vms[0].ygg_ip
output "vm1_planetary_ip" {
value = grid_deployment.d1.vms[0].planetary_ip
}
output "vm2_ip" {
value = grid_deployment.d1.vms[1].ip
}
output "vm2_ygg_ip" {
value = grid_deployment.d1.vms[1].ygg_ip
output "vm2_planetary_ip" {
value = grid_deployment.d1.vms[1].planetary_ip
}
```

View File

@@ -87,15 +87,15 @@ resource "grid_deployment" "d1" {
output "vm1_ip" {
value = grid_deployment.d1.vms[0].ip
}
output "vm1_ygg_ip" {
value = grid_deployment.d1.vms[0].ygg_ip
output "vm1_planetary_ip" {
value = grid_deployment.d1.vms[0].planetary_ip
}
output "vm2_ip" {
value = grid_deployment.d1.vms[1].ip
}
output "vm2_ygg_ip" {
value = grid_deployment.d1.vms[1].ygg_ip
output "vm2_planetary_ip" {
value = grid_deployment.d1.vms[1].planetary_ip
}
```
@@ -276,7 +276,7 @@ output "public_ip" {
value = grid_deployment.d1.vms[0].computedip
}
output "ygg_ip" {
value = grid_deployment.d1.vms[0].ygg_ip
output "planetary_ip" {
value = grid_deployment.d1.vms[0].planetary_ip
}
```

View File

@@ -77,8 +77,8 @@ output "public_ip" {
value = split("/",grid_deployment.d1.vms[0].computedip)[0]
}
output "ygg_ip" {
value = grid_deployment.d1.vms[0].ygg_ip
output "planetary_ip" {
value = grid_deployment.d1.vms[0].planetary_ip
}
```

View File

@@ -196,8 +196,8 @@ output "node1_zmachine1_ip" {
value = grid_deployment.d1.vms[0].ip
}
output "ygg_ip1" {
value = grid_deployment.d1.vms[0].ygg_ip
output "planetary_ip1" {
value = grid_deployment.d1.vms[0].planetary_ip
}
output "ipv4_vm1" {