Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding edge-native example #395

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

adding edge-native example #395

wants to merge 16 commits into from

Conversation

dmitry-spectro
Copy link
Contributor

Hey Nikolay,

Adding some edge native code example, as previously discuss am modifying .tf files directly and not docs.

Ideally I wanted to push lines 43-49 from "examples/e2e/edge-native/resource_clusterprofile.tf" to variables as well, but didn't find an easy way to do it

Happy to hear feedback :)

host_uid = spectrocloud_appliance.appliance0.uid
static_ip = "126.10.10.23"
host_uid = var.edge_id
#static_ip = "123.45.67.89"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put some description about use-cases where static IP may be optional.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I would wait for overlay feature to land before we revisit this example.

Copy link
Contributor

@nikchern nikchern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with some comments.

Copy link
Contributor

@karl-cardenas-coding karl-cardenas-coding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmitry-spectro I added some suggestions below. @nikchern I think we should add a description to the resource addon_deployment because I'm not sure I understand what it does.

Comment on lines 14 to 17
Here's an example on how to provision a vSphere cluster with:
- based on a profile "spectrocloud_cluster_profile"
- name: vsphere-cluster-1
- two node pool: 1 master, 1 worker with 8 CPUs, 8Gb RAM and 60Gb disk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Here's an example on how to provision a vSphere cluster with:
- based on a profile "spectrocloud_cluster_profile"
- name: vsphere-cluster-1
- two node pool: 1 master, 1 worker with 8 CPUs, 8Gb RAM and 60Gb disk
The following example provides a vSphere cluster with a cluster profile and two node pools: one master pool and one worker pool. Each node has 8 CPUs, 8Gb RAM, and 60Gb disk

Just a minor language cleanup to make it fit more the established style.

@@ -13,5 +13,209 @@ description: |-

{{ tffile "examples/resources/spectrocloud_cluster_profile/resource.tf" }}

Here's an example of provisioning a cluster profile for a vSphere cluster:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Here's an example of provisioning a cluster profile for a vSphere cluster:
#### vSphere
Example of a vSphere cluster profile that uses data resources to populate the required pack values.

```

Here's another example of a profile for an edge cluster with k3s:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Here's another example of a profile for an edge cluster with k3s:
#### Edge

We can add the Edge header and that way it becomes clearer and we can avoid having to state it's another example 😄

options:
system.uri: "{{ .spectro.pack.edge-native-byoi.options.system.registry }}/{{ .spectro.pack.edge-native-byoi.options.system.repo }}:{{ .spectro.pack.edge-native-byoi.options.system.k8sDistribution }}-{{ .spectro.system.kubernetes.version }}-{{ .spectro.pack.edge-native-byoi.options.system.peVersion }}-{{ .spectro.pack.edge-native-byoi.options.system.customTag }}"
system.registry: HERE-GOES-YOUR-REGISTRY
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmitry-spectro instead of HERE-GOES-YOUR-REGISTRY why don't we just make up the value? The reader will want an example of what is the expected value, so if it's a registry UID, let's just make one up. Same for the tag below. Otherwise, as a reader, I would be unsure of what value goes here and I would have to scroll down and hope the description of the variable explains it.

```

An example of a profile for a Coxedge:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
An example of a profile for a Coxedge:
#### Coxedge

Comment on lines 14 to 17
Here's an example on how to provision an edge cluster with:
- based on a profile "spectrocloud_cluster_profile"
- name: edge-native-tf-1
- single-node cluster with VIP and UID of edge device taken from variables
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following example snippet provisions a single-node Edge cluster with a VIP. The UID of the edge device is sourced from variables.

@@ -11,6 +11,23 @@ description: |-

## Example Usage

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following example creates an addon deployment that uses a manifest as the pack layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants