Comments (18)
from service-mesh-patterns.
Sure! I'd be happy to collaborate π
from service-mesh-patterns.
Right makes sense, I'll ask this question in the discussion forum
from service-mesh-patterns.
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.
@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.
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?
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.
Hey @hershd23 you are right we need to change the sayantan1413/... to layer5io/....
from service-mesh-patterns.
@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.
@leecalcote @theBeginner86 @sayantan1413
A couple of questions :-
- Is the
import
command available in mesheryctl yet? I am currently testing the existing action for theapply
command and added theimport
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 likeimport
is there yet. Atleast in the master branch. - Secondly is the idea to create two specific actions for testing
import
andapply
? Givenimport
would a lot of the same setup as that of theapply
command.
from service-mesh-patterns.
@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.
Any updates? @utkarsh-pro @leecalcote
from service-mesh-patterns.
@utkarsh-pro , please do chime in when you have a moment.
from service-mesh-patterns.
@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.
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
- 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.
- 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.
@utkarsh-pro πͺ
@hershd23, chat about this in today's Meshery Build and Release meeting? Details here - https://meet.layer5.io
from service-mesh-patterns.
An example use - https://github.com/meshery/meshery/blob/620ff1ef940af18cbfd846e5fe20c68bffb7b169/.github/workflows/testadapters.yaml#L143
from service-mesh-patterns.
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.
@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)
- use webp format images HOT 4
- Replace the Logo of Layer5 with Service-Mesh-Patterns in config.yml workflow HOT 1
- Patterns should be MeshModel compatible
- Update the year in footer HOT 2
- [CI] Create CI job to have an automated check that fails if a pattern file has an issue, model data missing, etc. (mesheryctl or etc.) HOT 6
- Issue Template Updates for Figma linkΒ HOT 15
- Inconsistency in footer layout compare to other page footer layout on layer5 HOT 5
- Remove "above" from label-commenter-config.yml HOT 4
- Change Twitter Logo to Xi(New logo) HOT 2
- want to add dark mode feature into website
- [Docs] README: Replace community sign HOT 4
- [CI]
- Add Istio Circuit breaker Design HOT 1
- About Layer5 section needed in the author's section
- [Chapters of the book] Improvements in CTA HOT 16
- [Website] Add Tom Kerkhove to Technical Reviewers section HOT 4
- No padding in the (Community Discussion Forum) button on the chapter's page (In Mobile devices) HOT 2
- [Docs] Support dark mode with light version of Service Mesh Patterns logo HOT 1
- [Docs] Support dark mode with light version of Service Mesh Patterns logo HOT 9
- Responsiveness in small screen HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from service-mesh-patterns.