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

Support mycelium on grid client deployments #2130

Merged
merged 34 commits into from
Feb 13, 2024

Conversation

AlaaElattar
Copy link
Contributor

@AlaaElattar AlaaElattar commented Feb 6, 2024

Description

  • Support mycelium on grid client deployments.
  • Scripts Fixed with adding mycelium flag with false.
  • mycelium switch added to all applications in playground.

Changes

  • Support mycelium in both grid client and playground.
  • Fix issue that planetary ip not appearing in playground.

Grid Client

  • User required to provide boolean value for mycelium flag, if wanted or not.
  • If yes, user can provide the hex seed or it will be generated from machine_ip . (Hex seed of length 6)
  • same for network seed can be provided from user or it will be generated. (Hex seed of length 32)
    • If network already existing, user should provide same seed or provide no seed. If seed is provided wrong the deployment will be rejected (same node).
    • If network already existing, but different node new seed will be generated (2 nodes can't have same network seed).
    • If user deployed network with no mycelium then updated it requesting mycelium, network will be updated.
  • can't deploy mycelium without planetary, will get no ip.
  • It's supported only to provide seeds from the grid_client scripts.

Playground

  • In playground, user only switch if mycelium wanted or not.
    • If mycelium flag is switched, planetary will be switched automatic.

Related Issues

#2085
#2107

1 - Single vm deployed form scripts with mycelium flagged true but no seed provided.
image

  • I was enable to ssh on the machine through its planetary ip.
Screencast.from.02-06-2024.12.07.09.PM.webm
  • I also deployed k8s from scripts and i was able to ssh on both master and worker.

2- Second issue of planetary ip not appearing in UI.
image

3- mycelium from playground. (supported for all applications)

Screencast.from.02-11-2024.12.52.58.PM.webm

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstrings
  • Screenshots/Video attached (needed for UI changes)

@AlaaElattar AlaaElattar marked this pull request as ready for review February 11, 2024 11:04
Copy link
Contributor

@AhmedHanafy725 AhmedHanafy725 left a comment

Choose a reason for hiding this comment

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

great job 👏
as a side note try not to break the method signature if you can even if you will change its call in every place

packages/grid_client/scripts/add_worker.ts Outdated Show resolved Hide resolved
packages/grid_client/scripts/single_vm.ts Outdated Show resolved Hide resolved
packages/grid_client/src/helpers/validator.ts Outdated Show resolved Hide resolved
packages/grid_client/src/high_level/machine.ts Outdated Show resolved Hide resolved
packages/grid_client/src/modules/k8s.ts Outdated Show resolved Hide resolved
packages/grid_client/src/primitives/network.ts Outdated Show resolved Hide resolved
packages/grid_client/src/primitives/network.ts Outdated Show resolved Hide resolved
packages/grid_client/src/primitives/network.ts Outdated Show resolved Hide resolved
packages/grid_client/src/zos/zmachine.ts Outdated Show resolved Hide resolved
packages/grid_client/src/zos/znet.ts Outdated Show resolved Hide resolved
@AhmedHanafy725
Copy link
Contributor

please add a script for deploying a VM with Mycelium after finishing the PR comments.

@AlaaElattar
Copy link
Contributor Author

  • Also now supported that user can provide network seed with its node id, will be helpful in case user deploying k8s with 2 workers each one in different node. (or multiple vms at same time)
  • As it's provided in kubernetes_mycelium script and sing_vm_mycelium.

packages/grid_client/src/helpers/validator.ts Outdated Show resolved Hide resolved
packages/grid_client/src/high_level/machine.ts Outdated Show resolved Hide resolved
packages/grid_client/src/high_level/kubernetes.ts Outdated Show resolved Hide resolved
packages/grid_client/src/high_level/kubernetes.ts Outdated Show resolved Hide resolved
packages/grid_client/src/high_level/network.ts Outdated Show resolved Hide resolved
packages/grid_client/src/modules/networks.ts Outdated Show resolved Hide resolved
packages/grid_client/src/primitives/network.ts Outdated Show resolved Hide resolved
packages/grid_client/src/primitives/network.ts Outdated Show resolved Hide resolved
packages/grid_client/src/primitives/network.ts Outdated Show resolved Hide resolved
packages/grid_client/src/primitives/network.ts Outdated Show resolved Hide resolved
Copy link
Member

@MohamedElmdary MohamedElmdary left a comment

Choose a reason for hiding this comment

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

Tried one of almost each solution using mycelium and tried to ssh and it seems to work just fine Thanks great job

@AlaaElattar AlaaElattar merged commit 18e44d6 into development Feb 13, 2024
3 checks passed
@AlaaElattar AlaaElattar deleted the development_add_mycelium branch February 13, 2024 12:28
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.

4 participants