-
Notifications
You must be signed in to change notification settings - Fork 12
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
Ibek j20 changes #3
Conversation
@coretl its getting to the point where I am happy with it. I think we need a 'add block to file' function which would make the changes here https://github.com/epics-containers/ibek-support/blob/ibek-j20-changes/ADSupport/install.sh#L26-L62 in an idempotent fashion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much neater.
We definitely need support.py for those things that are best written in python, but I think we should go down one route:
- Public interface is bash functions only that may call into support.py (but we hide this fact away)
- Public interface is python functions only in support.py and we ditch the bash
If we do 1 we would have things like add_module_to_release
instead of support add-module-to-release
, but functions would grow.
If we do 2 we would have things like ${SUPPORT} git-clone-tag ${NAME} ${VERSION} --org=https://github.com/areaDetector
instead of git_clone_tag ${NAME} ${VERSION} https://github.com/areaDetector
, but there would be no bash functions to read.
I don't know which is better. @GDYendell thoughts?
iocStats/dbd
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we like the separate files for lib and dbd?
git_clone_tag ${NAME} ${VERSION} | ||
|
||
support add-module-to-release ${NAME} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or should we have
add_ioc_libs devIocStats
add_ioc_dbds devIocStats.dbd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I MUCH prefer this. Forgot that I wanted to review this bit before doing the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now implemented
Including ditching the |
I like 1.
and that is what we currently have, although this one is a bit of a stretch to say it is bash 🙂
# Call functions in support.py
function support {
# Make RELEASE files to point to the correct paths by adding RELEASE.local
python ${GLOBALS_DIR}/support.py ${@}
}
|
I meant ditch the bash functions... |
@GDYendell @coretl We have decided to ditch functions.sh and go pure python. Custom steps inside of install.sh instances would use bash commands if appropriate but can also call python, |
OK @coretl @GDYendell the yet another refactor is complete. There is now no functions.sh and all functions have been moved into ibek. See the related PRs at: epics-containers/ibek#107 epics-containers/ioc-adsimdetector#1 In this repo you will want to look at the install.sh files for each support module. In particular I realized that the same CONFIG_SITE changes were required in ADCore and ADSimDetector. These changes are really at the generic IOC level rather than at the support module level. Therefore I have provided a mechanism for supplying parameters from the IOC (see https://github.com/epics-containers/ioc-adsimdetector/blob/ibek-j20-changes/generic_config_AD/config_site) |
Note I still need to add tests for the |
After the latest changes we have a pretty neat Dockerfile The most basic install.sh is tidy. The whole build of ADSimDetector generic IOC container takes under 4 mins. so I'm voting for keeping ADCore build in the individual Generic IOCs. This includes all the optional ADCore features except GraphicsMagic but no use of ADSupport. The final bit to do is tidy up the apt installs. Here is ADCore install.h as it stands. I'm wondering if there is any benefit in having ibek functions that just call back out to bash. But having said that I thought that:-
Therefore I argue that I might as well add:
|
Excellent, is
That looks very neat
That makes sense
Yes, and we don't do composition of the runtime stage apt installs at the moment...
That sounds reasonable, but there are likely to be some that are installed at dev and runtime (like the hdf ones), so how about:
|
bad5377
to
872fefa
Compare
Right - had a bit of a hiccup with a trivial problem that required rebuild of all container stages. Because it was an interaction between the dev and run stages. So wasted too much time on that: if only is AptWhen.run or AptWhen.both:
add_list_to_file(RUNTIME_DEBS, debs) Is NOT the same as:- if (only is AptWhen.run) or (only is AptWhen.both):
add_list_to_file(RUNTIME_DEBS, debs) DOH! maybe I need some sleep. Anyway @coretl @GDYendell I feel ready to merge. Let me know what you think. Here is what ADCore install.sh now looks like. I kinda like it. Thanks for iterating on this with me, Both. Its been very useful (my first attempt at an install.sh was crap - but useful for starting the discussion) Regarding global.sh - its not currently doing anything and I will look at it again when I get to RTEMS. I think its nice to have a place where you can change global patching without rebuilding ibek so maybe ibek should call a script ... no sure. |
5b900e2
to
fb26749
Compare
I think this looks really good now! I am a bit confused about |
They are not mutually exclusive but you would normally only use --runtime in the runtime section.
would install all the things that had previously been declared with a --run (or --both - the default) plus the two mypackage? `ibek support apt-install --run --runtime xxx would install all the packages declared, plus xxx plus it would add xxx to the runtime list (not something you want to do really but its sort of consistent right? ??? ) |
e5f3910
to
00c961a
Compare
00c961a
to
ec6a07f
Compare
This is a major refactor to tidy up ioc compilation in epics-containers
See related changes in the first test ioc here epics-containers/ioc-adsimdetector#1