[Sugar-devel] Sugarizer School Portal - Meeting: 11 May 2020

James Cameron quozl at laptop.org
Thu May 14 01:34:57 EDT 2020


G'day Nikhil,

You're missing a copyright in your source code, and your license file
has been modified.  Thanks!

On Mon, May 11, 2020 at 05:46:07PM +0530, NIKHIL MEHRA wrote:
> Hi,
> 
> Today, I had a meeting with Michaël and had discussions about work items from
> the last week which basically includes
> - Start working on Sugarizer-School-Portal-Server repo.
>  -- Set up basic node.js app
>  -- Add basic features like get deployments using `node-helm`
>  -- Write basic documentation
> 
> Problems experienced last week:
> -- `node-helm` was deprecated
> 
> Link to the repository: [1]https://github.com/NikhilM98/
> sugarizer-school-portal-server
> Additional instructions:
>  - npm install
>  - navigate to node-modules/node-helm/helm.js and modily line 17 (from
> `this.executer.callByArguments(command, callbackHandler(done));` to
> `this.executer.callByArguments(command, callbackHandler(done, true), true);`)
>  - npm start. The app will be available at localhost:8080 by default.
> 
> Here is a list of tasks that we have decided for this week:
> -- Add authentication to web app.
> -- Start working on UI.
> -- Look into Microsoft's helm-web-api and node-helm.
> 
> PFA slack logs for reference. Next meeting is scheduled for next Monday. 
> 
> Regards,
> Nikhil
> *
> 
> References:
> 
> [1] https://github.com/NikhilM98/sugarizer-school-portal-server

> Michaël Ohayon(opens in new tab)  3:32 PM
> Hello @Nikhil ! :wave:
> 3:32
> How are you doing?
> 
> Nikhil(opens in new tab)  3:32 PM
> Hello @Michaël Ohayon
> 3:32
> I'm doing fine
> 3:32
> What about you?
> 
> Michaël Ohayon(opens in new tab)  3:33 PM
> Great :slightly_smiling_face:
> 
> Nikhil(opens in new tab)  3:33 PM
> Nice
> 
> Michaël Ohayon(opens in new tab)  3:34 PM
> Do you have any question or issues before we start ?
> 
> Nikhil(opens in new tab)  3:34 PM
> Yeah. I have to discuss something about node-helm
> 3:35
> https://github.com/adibenmat/node-helm
> 3:35
> I mean it's part of the discussion, so we can start
> 3:36
> Should I go ahead and discuss the issue?
> 
> Michaël Ohayon(opens in new tab)  3:36 PM
> Just before that as a reminder :slightly_smiling_face: (edited) 
> 3:37
> I will expect you to send meeting notes to the mailing list (edited) 
> 
> Nikhil(opens in new tab)  3:37 PM
> http://lists.sugarlabs.org/archive/sugar-devel/2020-May/058287.html
> 
> Michaël Ohayon(opens in new tab)  3:37 PM
> If you have any issues prior the sending, feel free to dm me so we can forward a constructive email to te others
> 
> Nikhil(opens in new tab)  3:37 PM
> Is this fine?
> 
> Michaël Ohayon(opens in new tab)  3:38 PM
> Yes, thank you. :thumbsup:  Let’s keep this going
> :+1:
> 1
> 
> 
> Nikhil(opens in new tab)  3:38 PM
> Thanks
> 
> Michaël Ohayon(opens in new tab)  3:39 PM
> So yes, since the last meeting you had a look at node-helm
> 
> Nikhil(opens in new tab)  3:39 PM
> So shall we begin the discussion about the last week's work?
> 
> Michaël Ohayon(opens in new tab)  3:39 PM
> Yep
> 
> Nikhil(opens in new tab)  3:39 PM
> Okay... So the last week's tasks were:
> 3:41
> Set up a basic node.js web application.
> Add basic documentation
> Get basic node-helm functions get to work, specifically Get Releases function
> 3:41
> I was able to set up the app with the structure similar to that of Sugarizer-Server
> 3:41
> Here is the repository: https://github.com/NikhilM98/sugarizer-school-portal-server
> :+1:
> 1
> 
> 3:42
> The current issue I am facing is that node-helm does not supports Helm3. Also, it's at version 0.1.0 so it's not that stable. Also, it has limited features.
> 3:43
> I have gone through its code, it's quite easy to understand/modify
> 3:44
> I propose that we continue using node-helm . Update the existing code to add the features we need.
> 3:44
> The library has MIT License
> 3:44
> https://github.com/adibenmat/node-helm
> 
> Michaël Ohayon(opens in new tab)  3:45 PM
> I remember we talked about https://github.com/microsoft/helm-web-api
> 3:46
> I was going through logs, I was not sure about that kube in kube
> 
> Nikhil(opens in new tab)  3:46 PM
> The microsoft helm-web-api cannot be use directly. It actually installs kubernetes inside a cluster and then controls it.
> 3:46
> Let me check that again (edited) 
> 
> Michaël Ohayon(opens in new tab)  3:47 PM
> That’s what we where talking about but I do not see that in their repo
> 3:48
> Maybe you could give it a try again
> 3:48
> And I’ll do same on my side
> 
> Nikhil(opens in new tab)  3:50 PM
> I got that idea from this dockerfile: https://github.com/microsoft/helm-web-api/blob/master/Dockerfile
> 3:50
> They were installing K8s and Helm inside a container
> 
> Michaël Ohayon(opens in new tab)  3:50 PM
> I think it’s calling the host kube api directly but I may be wrong
> 3:51
> I’m not thinking they deploy kube in kube
> 3:52
> Their code has stuff like
> 3:52
> class PortsAllocator {
>   constructor(kubeClient) {
>     // setup an API client
>     let client = kubeClient;
>     if (typeof client === 'undefined' || client === null) {
>       try {
>         // assuming we are in the pod, try get the credentials from account service
>         client = new Client({ config: config.getInCluster() });
>       } catch (e) {
>         // we must be debugging locally, than pickup credentials from kube config
>         client = new Client({ config: config.fromKubeconfig() });
>       }
> 3:52
> /** Since the installation is via a Chart, init was already been called, no need to init again.
>  * We are leaving this as a comment, in case someone will need to execute it when
>  * installed via yaml files
>  */
> // console.log('Initializing tiller with service account: ' + process.env.TILLER_SERVICE_ACCOUNT);
> // exec(helmBinaryLocation + ' init --service-account ' + process.env.TILLER_SERVICE_ACCOUNT);
> 
> Nikhil(opens in new tab)  3:55 PM
> I think it’s calling the host kube api directly but I may be wrong
> Oh... In the instructions the step 1 was to "Install Helm with RBAC".
> Then in the Dockerfile they installed Kubernetes and Helm again. That's why I thought it was kube in kube.
> 
> Michaël Ohayon(opens in new tab)  3:55 PM
> Yeah no worries :smile: (edited) 
> 3:56
> I suggest you try it out before editing the node helm wrapper :thinking_face:
> 3:56
> What do you think?
> 
> Nikhil(opens in new tab)  3:56 PM
> Plus in the dockerfile they used Helm v2.10.0
> 3:56
> https://github.com/microsoft/helm-web-api/blob/master/Dockerfile
> 
> Michaël Ohayon(opens in new tab)  3:57 PM
> ah it’s because tiller is not required anymore
> 3:57
> in many k8s clusters
> 
> Nikhil(opens in new tab)  3:57 PM
> We can't use version 2. I read somewhere that they will be deprecating version 2
> 
> Michaël Ohayon(opens in new tab)  3:57 PM
> yes
> 
> Nikhil(opens in new tab)  3:58 PM
> So it will have problems similar to node-helm. Version issues.
> 
> Michaël Ohayon(opens in new tab)  3:58 PM
> There are a few forks
> 3:59
> That seems to be more up to date
> 
> Nikhil(opens in new tab)  3:59 PM
> Right!
> 
> Michaël Ohayon(opens in new tab)  3:59 PM
> https://github.com/dunefro/helm-web-api
> https://github.com/crkarthik11/helm-web-api
> https://github.com/nilesh93/helm-web-api
> 3:59
> https://github.com/dunefro/helm-web-api/blob/master/Dockerfile
> 3:59
> 3.0.3
> 3:59
> :thinking_face:
> 3:59
> this one also
> 3:59
> https://github.com/crkarthik11/helm-web-api/blob/master/Dockerfile
> 
> Nikhil(opens in new tab)  3:59 PM
> Nice
> 
> Michaël Ohayon(opens in new tab)  4:00 PM
> This one seems to have made the modifications
> 4:00
> https://github.com/dunefro/helm-web-api
> 4:00
> since crk-ish is a fork
> 
> Nikhil(opens in new tab)  4:00 PM
> Yeah
> 4:00
> Just noticed that
> 
> Michaël Ohayon(opens in new tab)  4:01 PM
> Maybe you could try that
> 
> Nikhil(opens in new tab)  4:02 PM
> Yeah
> 
> Michaël Ohayon(opens in new tab)  4:02 PM
> If that does not work at all, we’ll go onto our own modifications
> 
> Nikhil(opens in new tab)  4:02 PM
> Right
> 
> Michaël Ohayon(opens in new tab)  4:03 PM
> I have no doubt you’ll figure out what to do :smile:
> 4:03
> So as the previous meeting was only a few days ago do you have something you want to add for the “previous” part :smile: ?
> 
> Nikhil(opens in new tab)  4:04 PM
> image.png 
> image.png
> (opens in new tab)
> 
> 
> 
> Michaël Ohayon(opens in new tab)  4:04 PM
> :smile:
> 4:04
> Nice
> 
> Nikhil(opens in new tab)  4:04 PM
> Here is the first screenshot
> 
> Michaël Ohayon(opens in new tab)  4:04 PM
> Screenshot is nice I was only reading code
> 4:04
> https://github.com/NikhilM98/sugarizer-school-portal-server/commit/22694a7c9aacea422c43f48e69f3c7d0295b84f6
> 
> Nikhil(opens in new tab)  4:05 PM
> The problem is that if you clone and install the current code. It wont work directly
> 4:05
> I have made some changes in the node modules
> 4:05
> (In node-helm)
> 
> Michaël Ohayon(opens in new tab)  4:05 PM
> Oh yeah sure
> 
> Nikhil(opens in new tab)  4:05 PM
> Just made some minor changes to get this working (edited) 
> 
> Michaël Ohayon(opens in new tab)  4:08 PM
> I think you can send your screenshot, repo and that comment on the ML
> 4:08
> That will be nice to share your first working steps :smile:
> 
> Nikhil(opens in new tab)  4:09 PM
> Okay
> 4:09
> I'll also point out the changes that you need to make in node-helm
> 
> Michaël Ohayon(opens in new tab)  4:09 PM
> Perfect (edited) 
> 4:10
> Anything or issues you want to chat about?
> 4:11
> for that “last days part”?
> 
> Nikhil(opens in new tab)  4:11 PM
> No. Let's take a look at helm-web-api and node-helm and discuss tomorrow that what should we use.
> 4:12
> "last days part"?
> 4:12
> I'm little confused
> 
> Michaël Ohayon(opens in new tab)  4:12 PM
> I mean your work between now and our last meeting
> 4:13
> If you had anything more to add
> 4:13
> :slightly_smiling_face:
> 
> Nikhil(opens in new tab)  4:13 PM
> No. Nothing else
> :ok_hand:
> 1
> 
> 
> Michaël Ohayon(opens in new tab)  4:13 PM
> So yeah let’s try these helm-web-api forks
> 
> Nikhil(opens in new tab)  4:13 PM
> Yeah
> 
> Michaël Ohayon(opens in new tab)  4:14 PM
> I don’t know how they work with that missing Tiller thing
> 4:14
> But let’s discover
> 
> Nikhil(opens in new tab)  4:14 PM
> Yeah
> 
> Michaël Ohayon(opens in new tab)  4:14 PM
> So I suggest you keep almost the same goals for you week as before :slightly_smiling_face:
> 4:14
> If that’s ok?
> 
> Nikhil(opens in new tab)  4:16 PM
> I think by tomorrow or day after tomorrow we can make a conclusion about which library to use.
> 4:16
> After that we have to work on testing/improving that library. (edited) 
> 4:17
> The last week's goals were to create the web app, write basic docs and use node-helm in the app
> 4:18
> So this week maybe we can add some more features in the app. Like authentication.
> 
> Michaël Ohayon(opens in new tab)  4:19 PM
> Yeah that would be nice
> 
> Nikhil(opens in new tab)  4:19 PM
> If we add authentication. Should we keep it same as Sugarizer-Server. Use MongoDB for storage?
> 
> Michaël Ohayon(opens in new tab)  4:19 PM
> I’m not sure
> 4:20
> The code will be similar that is great
> 4:20
> But it’s not mandatory I guess
> 
> Nikhil(opens in new tab)  4:21 PM
> I think similar code will be a plus point to attract future contributors
> 
> Michaël Ohayon(opens in new tab)  4:21 PM
> Let’s go on Mongo then :thumbsup:
> 
> Nikhil(opens in new tab)  4:21 PM
> Plus there will be a possibility to use the same mongodb replicaset
> 
> Michaël Ohayon(opens in new tab)  4:22 PM
> Yes that would be nice
> 
> Nikhil(opens in new tab)  4:25 PM
> Let's discuss microsoft-web-api and node-helm again here.
> If we use microsoft-web-api then:
> let developers install, delete and upgrade helm charts from inside the cluster
> Using the API: If you used the default settings, the API will be accessible internally at: http://on-demand-micro-services-deployment-k8s.default.svc.cluster.local:4000
> The API will be available from inside the cluster.
> We can use services to access the API from outside the cluster.
> or
>  2. Install School Portal inside the cluster (edited) 
> 4:26
> If we use node-helm then our School Portal has to be outside the cluster.
> 
> Michaël Ohayon(opens in new tab)  4:28 PM
> I’m not sure about the node-helm and “has to be outside”
> 4:28
> an app calling node-helm could be use inside the cluster if it connect to kube management endpoint ?
> 4:29
> If we have the same kubectl from withing the container as on our computer that may work :thinking_face:
> 4:30
> I guess
> 
> Nikhil(opens in new tab)  4:31 PM
> an app calling node-helm could be use inside the cluster if it connect to kube management endpoint ?
> By Kube management endpoint do you mean Kubernetes API (https://kubernetes.io/docs/concepts/overview/kubernetes-api/) or something else? (edited) 
> 
> Michaël Ohayon(opens in new tab)  4:31 PM
> Yep
> 
> Nikhil(opens in new tab)  4:33 PM
> https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod (edited) 
> 
> Michaël Ohayon(opens in new tab)  4:33 PM
> Nice
> 4:33
> So we could access it anyway
> 4:34
> So I guess the choice “node-helm or the helm-web-api” does not block us about where the school portal is running (edited) 
> 
> Nikhil(opens in new tab)  4:35 PM
> Actually I was initially planning to run School Portal outside the cluster: https://sugarizer-workspace.slack.com/archives/C011B327MGX/p1588937867111200
> 
> Nikhil
> I was thinking that in order to simplify we could have
> The cluster
> ---- Admin Web APP
> ---- School 1
> ---- School 2
> School 1 and School 2 are Sugarizer-Server deployments.
> I was thinking of the structure like this:
> - Admin Web APP (Sugarizer-School-Portal)
> - The cluster (K8s)
> ---- MongoDB Replicaset
> ---- School 1 (Sugarizer-Chart Deployment)
> ---- School 2 (Sugarizer-Chart Deployment)
> Show less
> Posted in #sugarizer-schoolportal | May 8th(opens in new tab) | View message
> 
> Michaël Ohayon(opens in new tab)  4:36 PM
> Yes I know, but that’s not a technical issue if someone wants to run it also
> 4:36
> So that’s nice
> 
> Nikhil(opens in new tab)  4:36 PM
> So I guess the choice “node-helm or the helm-web-api” does not block us about where the school portal is running
> The problem will be with helm. Node helm is basically a wrapper around helm
> 4:37
> It let's us execute commands using Node.js Child Process using our app
> 4:38
> So if node-helm is running inside the cluster, we wont be able to access helm from there, which is outside the cluster
> 4:38
> That's why I said "If we use node-helm then our School Portal has to be outside the cluster."
> 
> Michaël Ohayon(opens in new tab)  4:40 PM
> I’m missing something I think but helm is just a stateless wrapper around Kubectl, right?
> 4:40
> So if the container having node is calling helm and has the correct configuration for managing kube api (edited) 
> 4:40
> Then it should work from anywhere (edited) 
> 4:41
> Regardless where it is running
> 
> Nikhil(opens in new tab)  4:43 PM
> I think but helm is just a stateless wrapper around Kubectl, right?
> Oh. I didn't thought of Helm as that way. Right!
> So we basically need to find some way to pass correct Kube API configuration to Helm
> 4:44
> Nice
> 
> Michaël Ohayon(opens in new tab)  4:44 PM
> :smile:
> 4:44
> So either way we should be okay
> 4:44
> We could run the portal from anywhere
> 
> Nikhil(opens in new tab)  4:44 PM
> Yeah
> 
> Michaël Ohayon(opens in new tab)  4:45 PM
> The only issue will be the db
> 4:45
> It will have to be accessible
> 4:45
> Not a big issue
> 4:45
> But still
> 
> Nikhil(opens in new tab)  4:47 PM
> I think for now. We can use external DB for School Portal. We can look into using the same DB when we move to creating Ansible package to set up the cluster and School Portal
> 4:48
> By External DB I mean simply install mongodb and use it. Not one from inside the cluster
> 
> Michaël Ohayon(opens in new tab)  4:48 PM
> Yeah :smile:
> 
> Nikhil(opens in new tab)  4:49 PM
> Okay. So it's decided. We'll use MongoDB and I'll set up authentication before the next meeting
> 4:49
> Do you have any opinion on the UI that we should be using?
> 
> Michaël Ohayon(opens in new tab)  4:50 PM
> You can do something close to what was done for the admin
> 4:50
> I think
> 
> Nikhil(opens in new tab)  4:50 PM
> You can do something close to what was done for the admin
> You mean for Sugarizer-Server?
> 
> Michaël Ohayon(opens in new tab)  4:51 PM
> Yep
> 
> Nikhil(opens in new tab)  4:52 PM
> Okay. I'll try to keep the UI similar
> :grin:
> 1
> 
> 4:52
> Actually Sugarizer-Server uses a mix of Material UI, Bootstrap and custom CSS
> 4:53
> Since things (libraries) are not coming from same place (Overwrite), so there are some issues with the UI (edited) 
> 
> Michaël Ohayon(opens in new tab)  4:54 PM
> Mmm if you want to change the stack you can
> :+1:
> 1
> 
> 
> Nikhil(opens in new tab)  4:54 PM
> Cool
> 4:54
> I will try to keep the UI similar
> 4:57
> So if we end up using either of helm-web-api or node-helm. Probably we would need to update the libraries to add more functions (edited) 
> 4:57
> helm-web-api also has limited features: https://github.com/microsoft/helm-web-api/blob/master/on-demand-micro-services-deployment-k8s/helm.js
> 4:58
> I think it has only install upgrade and delete features. We would need to add features ourselves.
> 
> Michaël Ohayon(opens in new tab)  4:59 PM
> It’s too bad they forgot simple stuff compared to what they have already done
> 
> Nikhil(opens in new tab)  5:00 PM
> node-helm has comparatively more features: install upgrade  delete list get history test status rollback
> 5:01
> Reference: https://github.com/adibenmat/node-helm/blob/master/helm.js
> 
> Michaël Ohayon(opens in new tab)  5:01 PM
> Maybe try it out first then :thinking_face:
> 
> Nikhil(opens in new tab)  5:01 PM
> I used the list command in the Screenshot
> 5:01
> Maybe try it out first then
> Yeah
> 5:04
> So if we have to update the code (Most probably we have to), then what should we do?
> Fork the API and make changes or use their code directly inside our project (Since both of them have MIT license)?
> 
> Michaël Ohayon(opens in new tab)  5:04 PM
> Yes you may fork, do your update locally
> 5:04
> And you can trigger PR’s
> 5:04
> Also
> 5:04
> If they do not want your PR’s we’ll stick on your repo
> 
> Nikhil(opens in new tab)  5:05 PM
> Okay
> 
> Michaël Ohayon(opens in new tab)  5:05 PM
> But for now let’s go onto your repo only (edited) 
> 
> Nikhil(opens in new tab)  5:06 PM
> You mean "But for now let’s go into your repo only"?
> 
> Michaël Ohayon(opens in new tab)  5:07 PM
> Yep
> 
> Nikhil(opens in new tab)  5:07 PM
> Google made that suggestion :joy:
> 
> Michaël Ohayon(opens in new tab)  5:07 PM
> :joy:
> 5:08
> Do you have all you need to continue working for now ? :thinking_face:
> 
> Nikhil(opens in new tab)  5:09 PM
> Yeah.
> Add authentication to web app.
> Start working on UI.
> Look into Microsoft's helm-web-api and node-helm.
> (edited)
> 5:10
> What else?
> 
> Michaël Ohayon(opens in new tab)  5:10 PM
> I guess that is sufficent :smile:
> 
> Nikhil(opens in new tab)  5:11 PM
> I think if we end up agreeing between helm-web-api and node-helm we can start adding features/modifying their code.
> 5:11
> Let's keep that task optional for this week.
> 5:13
> Actually I already took a good look into node-helm code and was excited to modify it. Maybe we'll end up modifying it and putting up an npm package on the web. It'll be my first npm package
> 
> Michaël Ohayon(opens in new tab)  5:14 PM
> Haha that is a nice reward
> 
> Nikhil(opens in new tab)  5:14 PM
> Yeah
> 5:15
> So this is it?
> 5:15
> Should we end this meeting?
> 5:15
> https://sugarizer-workspace.slack.com/archives/C011B327MGX/p1589197197106900
> 
> Nikhil
> Yeah.
> • Add authentication to web app.
> • Start working on UI.
> • Look into Microsoft's helm-web-api and node-helm.
> Posted in #sugarizer-schoolportal | Today at 5:09 PM(opens in new tab) | View message
> 5:15
> These are the tasks for the week.
> 5:16
> You said that the format was:
> - TODO from the previous week (not at the first meeting of course)
> - Problems experienced last week
> - TODO for the next week
> 5:17
> What should I add in "Problems experienced last week"?
> node-helm was deprecated
> 
> Nikhil(opens in new tab)  5:38 PM
> @Michaël Ohayon are you still there?
> 
> Michaël Ohayon(opens in new tab)  5:38 PM
> Yes !
> 5:38
> Sorry had a small call
> 
> Nikhil(opens in new tab)  5:39 PM
> Cool
> 
> Michaël Ohayon(opens in new tab)  5:39 PM
> Yes we may end, it’s ok to say node-helm is deprecated I think
> 
> Nikhil(opens in new tab)  5:39 PM
> Okay
> 5:39
> Bye
> 
> Michaël Ohayon(opens in new tab)  5:39 PM
> Thanks again for you work :ok_hand:
> 
> Nikhil(opens in new tab)  5:39 PM
> Have a good day
> 
> Michaël Ohayon(opens in new tab)  5:39 PM
> Same for you!

> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel


-- 
James Cameron
http://quozl.netrek.org/


More information about the Sugar-devel mailing list