@igorpsoares:matrix.org | I was talking to daniel.caires about the work we have been doing to improve the Application Framework and he mentioned a very good initiative from his team that aims to automate the creation of FluxCD apps for StarlingX. I believe that their work can be useful for the AppFwk team in the context of story 2010929. jreed, I believe it can be useful for your upcoming work as well. Here is the link: http://github.com/Danmcaires/StarlingX-App-Generator | 12:27 |
---|---|---|
@daniel.caires:matrix.org | Following this app-generator that igorpsoares linked, we also started a review on the app generator that is in the tools repo, so it can generate an Armada or Flux app https://review.opendev.org/c/starlingx/tools/+/897249 | 12:39 |
@igorpsoares:matrix.org | daniel.caires: what are the main differences between the two of them? At this point, the one from the tools repo can only generate Armada/helmv2 apps, right? | 13:00 |
@brunomuniz:matrix.org | > <@igorpsoares:matrix.org> daniel.caires: what are the main differences between the two of them? At this point, the one from the tools repo can only generate Armada/helmv2 apps, right? | 13:55 |
Hello, igorpsoares . The app-generator on Daniel's Github account was some sort of fork that we did to study/understand what StarlingX is capable. We were focusing on Flux, so we made it work for Flux. | ||
The Review on the `tools` repo that Daniel is proposing is taking what we learned and actually proposing something officially for the community (which is basically fight entropy 😄 putting this code to work considering the most recent architecture of StarlingX). | ||
@brunomuniz:matrix.org | > <@igorpsoares:matrix.org> daniel.caires: what are the main differences between the two of them? At this point, the one from the tools repo can only generate Armada/helmv2 apps, right? | 13:56 |
> At this point, the one from the tools repo can only generate Armada/helmv2 apps, right? | ||
Exactly. Daniel's Review adds support to Flux. | ||
@brunomuniz:matrix.org | igorpsoares: from an organization point of view, should [Daniel's review](https://review.opendev.org/c/starlingx/tools/+/897249) be a Task under [this Story](https://storyboard.openstack.org/#!/story/2010929)? | 14:01 |
@brunomuniz:matrix.org | Another thing that particularly interests me is that if this initiative involves a Demo app to be deployed to StarlingX as an example. | 15:05 |
We didn't find an app that was specifically designed to server as a testing app (within the Community), so we ended up developing a very simple one based on a conversation that happened in the Summit with someone trying to use StarlingX: https://github.com/bmuniz-daitan/poc-starlingx-messages. But we need more feedback from the Community to understand if this is something we want to bring to the community as part of its "tools". | ||
@brunomuniz:matrix.org | * Another thing that particularly interests me is that if this initiative involves a Demo app to be deployed to StarlingX as an example. | 15:05 |
We didn't find an app that was specifically designed to serve as a testing app (within the Community), so we ended up developing a very simple one based on a conversation that happened in the Summit with someone trying to use StarlingX: https://github.com/bmuniz-daitan/poc-starlingx-messages. But we need more feedback from the Community to understand if this is something we want to bring to the community as part of its "tools". | ||
@igorpsoares:matrix.org | > <@brunomuniz:matrix.org> igorpsoares: from an organization point of view, should [Daniel's review](https://review.opendev.org/c/starlingx/tools/+/897249) be a Task under [this Story](https://storyboard.openstack.org/#!/story/2010929)? | 15:28 |
I don't think that is particularly necessary because the task is more focused on multi-version application support but I do believe it should have an story on its own. | ||
@igorpsoares:matrix.org | > <@brunomuniz:matrix.org> Another thing that particularly interests me is that if this initiative involves a Demo app to be deployed to StarlingX as an example. | 15:30 |
> | ||
> We didn't find an app that was specifically designed to serve as a testing app (within the Community), so we ended up developing a very simple one based on a conversation that happened in the Summit with someone trying to use StarlingX: https://github.com/bmuniz-daitan/poc-starlingx-messages. But we need more feedback from the Community to understand if this is something we want to bring to the community as part of its "tools". | ||
I think that jreed would be very much interested on that. We may need to add some more metadata to test the multi-version support but it can be a base for our work | ||
@jreed:matrix.org | > <@igorpsoares:matrix.org> I think that jreed would be very much interested on that. We may need to add some more metadata to test the multi-version support but it can be a base for our work | 18:41 |
Yes. I am having a look at it. | ||
@jreed:matrix.org | brunomuniz: | 19:33 |
I appreciate the effort making an app generator. | ||
https://github.com/Danmcaires/StarlingX-App-Generator/tree/main | ||
A couple things that come to mind looking at is | ||
1) I could not get it to work. Kept getting a stack trace running the script. | ||
2) the venv folder is versioned, instead I'd make a requirements.txt file, and | ||
3) it would be helpful if it were a python package where one might do "pip install starlingx-app-gen" (or similar), and then on the command line you could use the generator directly. | ||
@brunomuniz:matrix.org | > <@jreed:matrix.org> brunomuniz: | 20:39 |
> I appreciate the effort making an app generator. | ||
> | ||
> https://github.com/Danmcaires/StarlingX-App-Generator/tree/main | ||
> | ||
> A couple things that come to mind looking at is | ||
> 1) I could not get it to work. Kept getting a stack trace running the script. | ||
> 2) the venv folder is versioned, instead I'd make a requirements.txt file, and | ||
> 3) it would be helpful if it were a python package where one might do "pip install starlingx-app-gen" (or similar), and then on the command line you could use the generator directly. | ||
1. I personally only tested the generator with the [portieris-armada-app](https://opendev.org/starlingx/portieris-armada-app) and had no problems after properly filling up the [app_manifest.yml](https://github.com/Danmcaires/StarlingX-App-Generator/blob/main/app_manifest.yaml) input file. Got a package and was able to deploy to StarlingX (system application-upload, system application-apply...). | ||
@jreed:matrix.org | I'm just using a random helm chart I found on the internet as a starting point and not having any luck. | 20:40 |
@jreed:matrix.org | I am reworking the code to be a console script python package that I can pip install while I'm evaluating it. | 20:41 |
@brunomuniz:matrix.org | Which one? Let me try as well | 20:41 |
@brunomuniz:matrix.org | > <@jreed:matrix.org> I am reworking the code to be a console script python package that I can pip install while I'm evaluating it. | 20:42 |
I like that idea... would probably be better to that directly into the existing app-gen, maybe? | ||
@brunomuniz:matrix.org | (see my other comment outside this thread - sending now) | 20:42 |
@jreed:matrix.org | I grabbed somebody's adminer helm chart to play with - https://github.com/cetic/helm-adminer | 20:42 |
@brunomuniz:matrix.org | But the code in this repo (and that also covers comments 2 and 3) won't probably be updated anymore. It's duplicating existing things from the community. Right now we already have a WIP Review to integrate this into the existing [app-generator](https://review.opendev.org/c/starlingx/tools/+/897249) and we could add more requirements on a Story. | 20:42 |
@brunomuniz:matrix.org | Let me try this one | 20:43 |
@jreed:matrix.org | > <@brunomuniz:matrix.org> But the code in this repo (and that also covers comments 2 and 3) won't probably be updated anymore. It's duplicating existing things from the community. Right now we already have a WIP Review to integrate this into the existing [app-generator](https://review.opendev.org/c/starlingx/tools/+/897249) and we could add more requirements on a Story. | 20:44 |
Got it. Feel free to add me to the review. Maybe after it gets merged initialy, I can make some more mods. I'm just toying with the generator you put on github in my own environment. | ||
@jreed:matrix.org | > <@jreed:matrix.org> Got it. Feel free to add me to the review. Maybe after it gets merged initialy, I can make some more mods. I'm just toying with the generator you put on github in my own environment. | 20:45 |
Actually... if you want to post the review link, I'll take a peek? | ||
@brunomuniz:matrix.org | > <@jreed:matrix.org> Actually... if you want to post the review link, I'll take a peek? | 20:46 |
It's there (markdown formatting :), but here's the link: https://review.opendev.org/c/starlingx/tools/+/897249 | ||
@jreed:matrix.org | I think it's assuming some paths are relative/fixed and when I reorganized the code its now breaking. Might be me... 😅 | 20:46 |
@brunomuniz:matrix.org | Hahaha... yeah, there's a lot to improve in the code, for sure. | 20:52 |
@brunomuniz:matrix.org | I got it to work... got a few errors but the error descriptions were useful... | 20:52 |
@brunomuniz:matrix.org | ``` | 20:52 |
@brunomuniz:matrix.org | * >> python3 app-gen.py -i app_manifest.yaml --no-package | 20:52 |
helm-adminer adminer | ||
Traceback (most recent call last): | ||
File "app-gen.py", line 922, in <module> | ||
main(sys.argv[1:]) | ||
File "app-gen.py", line 918, in main | ||
generate_app(os.path.abspath(input_file), os.path.abspath(output_folder), overwrite, no_package, package_only) | ||
File "app-gen.py", line 873, in generate_app | ||
flux_manifest.gen_app(app_out, overwrite, no_package, package_only) | ||
File "app-gen.py", line 620, in gen_app | ||
self.check_charts() | ||
File "app-gen.py", line 798, in check_charts | ||
raise ValueError(err_str) | ||
ValueError: name has different values in app-manifest.yaml and ../helm-adminer/Chart.yaml | ||
StarlingX-App-Generator (main) | ||
>> vim app_manifest.yaml | ||
StarlingX-App-Generator (main) | ||
>> python3 app-gen.py -i app_manifest.yaml --no-package | ||
4.8.1 0.2.1 | ||
Traceback (most recent call last): | ||
File "app-gen.py", line 922, in <module> | ||
main(sys.argv[1:]) | ||
File "app-gen.py", line 918, in main | ||
generate_app(os.path.abspath(input_file), os.path.abspath(output_folder), overwrite, no_package, package_only) | ||
File "app-gen.py", line 873, in generate_app | ||
flux_manifest.gen_app(app_out, overwrite, no_package, package_only) | ||
File "app-gen.py", line 620, in gen_app | ||
self.check_charts() | ||
File "app-gen.py", line 798, in check_charts | ||
raise ValueError(err_str) | ||
ValueError: version has different values in app-manifest.yaml and ../helm-adminer/Chart.yaml | ||
StarlingX-App-Generator (main) | ||
>> vim app_manifest.yaml | ||
StarlingX-App-Generator (main) | ||
>> python3 app-gen.py -i app_manifest.yaml --no-package | ||
FluxCD manifest generated! | ||
Plugins generated! | ||
Metadata generated! | ||
@brunomuniz:matrix.org | * ``` | 20:53 |
>> python3 app-gen.py -i app_manifest.yaml --no-package | ||
helm-adminer adminer | ||
Traceback (most recent call last): | ||
File "app-gen.py", line 922, in <module> | ||
main(sys.argv[1:]) | ||
File "app-gen.py", line 918, in main | ||
generate_app(os.path.abspath(input_file), os.path.abspath(output_folder), overwrite, no_package, package_only) | ||
File "app-gen.py", line 873, in generate_app | ||
flux_manifest.gen_app(app_out, overwrite, no_package, package_only) | ||
File "app-gen.py", line 620, in gen_app | ||
self.check_charts() | ||
File "app-gen.py", line 798, in check_charts | ||
raise ValueError(err_str) | ||
ValueError: name has different values in app-manifest.yaml and ../helm-adminer/Chart.yaml | ||
StarlingX-App-Generator (main) | ||
>> vim app_manifest.yaml | ||
StarlingX-App-Generator (main) | ||
>> python3 app-gen.py -i app_manifest.yaml --no-package | ||
4.8.1 0.2.1 | ||
Traceback (most recent call last): | ||
File "app-gen.py", line 922, in <module> | ||
main(sys.argv[1:]) | ||
File "app-gen.py", line 918, in main | ||
generate_app(os.path.abspath(input_file), os.path.abspath(output_folder), overwrite, no_package, package_only) | ||
File "app-gen.py", line 873, in generate_app | ||
flux_manifest.gen_app(app_out, overwrite, no_package, package_only) | ||
File "app-gen.py", line 620, in gen_app | ||
self.check_charts() | ||
File "app-gen.py", line 798, in check_charts | ||
raise ValueError(err_str) | ||
ValueError: version has different values in app-manifest.yaml and ../helm-adminer/Chart.yaml | ||
StarlingX-App-Generator (main) | ||
>> vim app_manifest.yaml | ||
StarlingX-App-Generator (main) | ||
>> python3 app-gen.py -i app_manifest.yaml --no-package | ||
FluxCD manifest generated! | ||
Plugins generated! | ||
Metadata generated! | ||
``` | ||
@brunomuniz:matrix.org | This is the patch of how I filled the `app_manifest.yml`: | 20:54 |
``` | ||
diff --git a/app_manifest.yaml b/app_manifest.yaml | ||
index 54ef3c0..c99a26e 100644 | ||
--- a/app_manifest.yaml | ||
+++ b/app_manifest.yaml | ||
@@ -1,13 +1,13 @@ | ||
--- | ||
## App Manifest Configuration | ||
appManifestFile-config: | ||
- appName: # required | ||
- appVersion: # required | ||
- namespace: # required | ||
+ appName: helm-adminer | ||
+ appVersion: 4.8.1 # required | ||
+ namespace: default # required | ||
chart: | ||
- - name: # required | ||
- version: # required | ||
- path: # required | ||
+ - name: adminer # required | ||
+ version: 0.2.1 # required | ||
+ path: ../helm-adminer # required | ||
################################################# | ||
## App Metadata Configuration | ||
# for further details about possible configurations on this file, please | ||
@@ -62,8 +62,9 @@ metadataFile-config: | ||
# https://opendev.org/starlingx/app-dell-storage/src/branch/master/python3-k8sapp-dell-storage/k8sapp_dell_storage/setup.cfg | ||
setupFile-config: | ||
metadata: | ||
- author: # required | ||
- author-email: # required | ||
- url: # required | ||
+ author: It sa me, Mario # required | ||
+ author-email: mario@mario.com # required | ||
+ url: www.mario.com # required | ||
classifier: # required | ||
- - # required | ||
\ No newline at end of file | ||
+ - "Can't remember what's that" | ||
+ | ||
``` | ||
@jreed:matrix.org | Then its defiantly what I've done to the organization of files to make it into a package that's causing it to break. | 20:54 |
@brunomuniz:matrix.org | I like that idea, though... let's not abandon it. | 20:55 |
@jreed:matrix.org | Basically, my idea is to have a repo where I maintain a bunch of those manifest yaml files, and I can generate an app for each on demand. | 20:55 |
@jreed:matrix.org | And I'm a python geek so everything must be a package... | 20:56 |
@jreed:matrix.org | I can probably back share what I'm doing once I finish. I'm not changing any code except to get it to run. | 20:56 |
@brunomuniz:matrix.org | I wanted to do the packaging thing when we first started dealing with existing Python code, but we didn't have time to dig too deep and I personally I'm not that into Python programming 😆 | 20:56 |
@brunomuniz:matrix.org | > <@jreed:matrix.org> I can probably back share what I'm doing once I finish. I'm not changing any code except to get it to run. | 20:57 |
Noice! Please do. Then we can take car of incorporating into the existing things. | ||
@brunomuniz:matrix.org | > <@jreed:matrix.org> I can probably back share what I'm doing once I finish. I'm not changing any code except to get it to run. | 20:57 |
* Noice! Please do. Then we can take care of incorporating into the existing things. | ||
@jreed:matrix.org | A friendly recommendation when it comes to paths in python... os.path is your best friend :) | 20:57 |
@brunomuniz:matrix.org | That's completely unreviewd code, btw... you're being exposed to the inner works of my team, basically... 😆 | 20:58 |
@jreed:matrix.org | Great... good time to be extra harsh 🤣 | 20:59 |
@brunomuniz:matrix.org | Well, the goal of a code review is to make people cry, isn't it? That's what I learned back then | 21:00 |
@brunomuniz:matrix.org | * Well, the goal of a code review is to make people cry, isn't it? That's what I learned back then 🤣 | 21:01 |
@jreed:matrix.org | Question: A setup.py file is generated for the plugins folder. What's the point of calling "python3 setup.py bdist_wheel --universal ... etc" ? | 21:07 |
@jreed:matrix.org | I got it work btw. I just had to fix a couple spots where some relative paths were use when an absolute path was available. | 21:08 |
@brunomuniz:matrix.org | > <@jreed:matrix.org> Question: A setup.py file is generated for the plugins folder. What's the point of calling "python3 setup.py bdist_wheel --universal ... etc" ? | 21:09 |
Gonna invoke daniel.caires to answer you tomorrow morning :) | ||
@jreed:matrix.org | There's a code comment that says its for generating the wheels for the plugin. 🤷♂️ | 21:10 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!