Code Monkey home page Code Monkey logo

Comments (18)

leecalcote avatar leecalcote commented on June 15, 2024 1

@rav121, @sayantan1413

from service-mesh-patterns.

theBeginner86 avatar theBeginner86 commented on June 15, 2024 1

Sure! I'd be happy to collaborate πŸ‘

// @hershd23 @leecalcote

from service-mesh-patterns.

hershd23 avatar hershd23 commented on June 15, 2024 1

Right makes sense, I'll ask this question in the discussion forum

from service-mesh-patterns.

hershd23 avatar hershd23 commented on June 15, 2024

I am interested to take up this issue.

Note:- I do not have a lot of experience with GitHub actions but would be looking to pick up some knowledge along the way

from service-mesh-patterns.

leecalcote avatar leecalcote commented on June 15, 2024

@hershd23, thank you for both volunteering and for signposting expectations based on your current level of experience. Let's give this a shot and see how far you get. @theBeginner86, perhaps, you might collaborate with @hershd23? You can copy much of what is written into other mesheryctl GitHub Actions.

from service-mesh-patterns.

hershd23 avatar hershd23 commented on June 15, 2024

One thing I noticed here is that this action still refers a fork made by a contributor. Should we update this with the layer5io repo?

uses: sayantan1413/mesheryctl-service-mesh-patterns-action@master

This task actually takes care of the apply command. I guess the idea would be to leverage the setup and other steps already done here to also include the import command.

Looking at the action, it is still failing so will have to debug this first before going ahead.

@leecalcote @theBeginner86 any resources around how to build a dev/test environment for actions on a fork? Anything setup that CI contributors generally use? If you don't have an idea can you point me to someone who might have an idea

from service-mesh-patterns.

sayantan1413 avatar sayantan1413 commented on June 15, 2024

Hey @hershd23 you are right we need to change the sayantan1413/... to layer5io/....

from service-mesh-patterns.

theBeginner86 avatar theBeginner86 commented on June 15, 2024

@hershd23
I'm not sure of the best way of doing it but I generally test out small sections of the GitHub action in one of my testing repo. πŸ˜…

Though asking this question in the discussion forum https://discuss.layer5.io, would help us get a better answer from other community members.

from service-mesh-patterns.

hershd23 avatar hershd23 commented on June 15, 2024

@leecalcote @theBeginner86 @sayantan1413
A couple of questions :-

  • Is the import command available in mesheryctl yet? I am currently testing the existing action for the apply command and added the import command before it to test it once but it errored out as you can check here. I also checked the pattern directory in mesheryctl and it doesn't look like import is there yet. Atleast in the master branch.
  • Secondly is the idea to create two specific actions for testing import and apply? Given import would a lot of the same setup as that of the apply command.

from service-mesh-patterns.

leecalcote avatar leecalcote commented on June 15, 2024

@hershd23, great questions. @utkarsh-pro, would like to describe the differences between importing and applying and how this is done via mesheryctl?

// @piyushsingariya @hexxdump @alphaX86 @navendu-pottekkat @s1ntaxe770r

https://docs.meshery.io/reference/mesheryctl/pattern/apply

from service-mesh-patterns.

hershd23 avatar hershd23 commented on June 15, 2024

Any updates? @utkarsh-pro @leecalcote

from service-mesh-patterns.

leecalcote avatar leecalcote commented on June 15, 2024

@utkarsh-pro , please do chime in when you have a moment.

from service-mesh-patterns.

tangledbytes avatar tangledbytes commented on June 15, 2024

@hershd23 right now, both "import" and "apply" happen in the same command. Before we understand how it is done through mesheryctl let's clarify what "importing" and "applying" means in the context of patterns.

Import: When you import a pattern, you are basically fetching a pattern from a source (here source could be: any HTTP endpoint, filesystem or Github - yes, we have special import features for Github) and saving it on a Meshery Providers database for future retrievals/usage.

Apply: Patterns are nothing but YAMLs which are declarative in nature, just like everything is in Kubernetes. When you send a pattern to meshery server for it to process the patterns and perform actions based on the YAML, we call it "applying". It is very similar to kubectl apply -f.

Here's how are the ways in which it works:

  • A user can run mesheryctl pattern apply -f <file name | URL>, this will do the following:
    • mesheryctl will "import" the pattern.
    • After "importing", it will "apply" the pattern.
  • A user can run mesheryctl pattern apply <pattern-name>, this will do the following:
    • mesheryctl will search patterns in the provider's database which are registered against the user running the command.
    • If there are more than one pattern registered with the same name then the user is presented with the list to select a pattern.
    • Selected pattern is "applied"

It should be noted that a user can pass --skip-save in conjunction with above commands, which will skip the "import" step and will only "apply" the pattern.

I hope this clarifies some of the doubts.

from service-mesh-patterns.

hershd23 avatar hershd23 commented on June 15, 2024

Thanks @utkarsh-pro, this makes pattern import and apply quite clear.

This is what I have done till now :-
https://github.com/hershd23/service-mesh-patterns/runs/4953284735?check_suite_focus=true
Here is a CI run. At this point in time I have changed the pattern-action.yml file to the sample action format given here with the correct action location. This runs successfully, and at this point runs for any URL supplied.

Logically the next question is what would the deliverables be for this issue. @leecalcote @theBeginner86 do help me out here

  1. The part of testing out various service mesh patterns could be done easily, with this workflow asking for various parameters before the run. Simply providing the URL of the pattern would suffice here.
  2. How should we go about implementing the second case as described by @utkarsh-pro? One (not so neat) way to do this is to apply pattern1 using URL then pattern2 using URL and then trying to apply pattern1 again using only the pattern-name. Let me know if there's a better idea

from service-mesh-patterns.

leecalcote avatar leecalcote commented on June 15, 2024

@utkarsh-pro πŸ’ͺ

@hershd23, chat about this in today's Meshery Build and Release meeting? Details here - https://meet.layer5.io

from service-mesh-patterns.

leecalcote avatar leecalcote commented on June 15, 2024

An example use - https://github.com/meshery/meshery/blob/620ff1ef940af18cbfd846e5fe20c68bffb7b169/.github/workflows/testadapters.yaml#L143

from service-mesh-patterns.

hershd23 avatar hershd23 commented on June 15, 2024

A couple of comments on this issue. I went through the CI call and understood there was some uncertainty whether this is required or not.

A lot of what we want is already done here https://github.com/layer5io/meshery-service-mesh-patterns-action/blob/master/mesheryctl.sh. The structure of the action is a little convoluted though.

If you see the repo here, this edited workflow script calls action.yml which in turn calls main.js which in turn spins up a child process main.sh which then calls meshery.sh for setup actions like setting up minikube and meshery and then mesheryctl.sh which tests the 'mesheryctl pattern apply -f ' action.

TL;DR :- Most of what we need is already there in https://github.com/layer5io/mesheryctl-service-mesh-patterns-action, just in a way that is a little convoluted.

Hence just changing the pattern-action.yml workflow to the format given here, the whole action runs successfully. Even if this not a must have we can easily just change pattern-action.yml and we'll have a working action for pattern apply

from service-mesh-patterns.

leecalcote avatar leecalcote commented on June 15, 2024

@hershd23 great research. Please proceed. As reusable Action, the Patterns Action shouldn't provision Kubernetes, but ask the user for their kubeconfig. This would be a good change to make.

from service-mesh-patterns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.