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
Docker-Image-Pull Feature #553
Conversation
… which pulls the image by Using Docker-Engine-Api from multiple registry like AWS, Azure, Docker-Hub
Docker-Images-Pulling-Instructions -: For configuring images ,whose instance we have to create and firstly we have to configure credentials ,from where we have to fetch/pull images.
Registry-Location : it contains the Registry-server-address now.
Username : Name of user from which we can login to docker . |
I apologize for the long delay reviewing this. The changes look good so there is just one thing missing: adding yourself to the AUTHORS file to take more formal credit for your changes, and to grant others clear permission to use them. There are 2 sections in the AUTHORS file to sign by adding your legal name and github username like the others, and it must be a commit from the named GitHub account. There is one section for the CC0 license and one for the patent disclaimer in addition to the copyright disclaimer for CC0. |
@@ -348,6 +359,42 @@ along with this software (see the LICENSE.md file). If not, see | |||
ec.logger.info("Initializing docker container for ${appInstance.instanceName} with:\n${jsonBody}") | |||
restClient.jsonObject(jsonBody) | |||
|
|||
try { | |||
authToken = instanceImage.password | |||
if (((String) instanceImage.username).equals("AWS")) { |
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.
@rohitpawar2811
Instead of having check on userName, we can extend InstanceImage entity to store the processCommand
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.
Yes @dixitdeepak you are right I think we can go on this way :
we can create a field named authTokenCmd
into moqui.server.instance.InstanceImage
and then we can check based on that if authTokenCmd is not empty then go for that , otherwise use password for authentication, From this way we can make it more generic and other registries like aws (which generate token different by using cmd) can easily configured.
…d(authTokenPass) inside the entity InstanceImage , now user has separate field for cmd and password so all types of registries is easily configurable
@dixitdeepak I have revised the changes as you suggested to me, thank you for suggestions. |
@jonesde I have added Authors file as you said ,Thank you! |
@jonesde Anything wrong with my changes? |
framework/entity/ServerEntities.xml
Outdated
@@ -196,6 +196,7 @@ along with this software (see the LICENSE.md file). If not, see | |||
<field name="username" type="text-short"/> | |||
<field name="password" type="text-medium" encrypt="true"/> | |||
<field name="emailAddress" type="text-medium"/> | |||
<field name ="authTokenCmd" type="text-medium"/> |
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.
Please add a description to authTokenCmd
and remove the extra space there
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.
Added description to authTokenCmd.
Removed the extra space.
Thanks for pointing it out!
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.
You're welcome!
<script><![CDATA[ | ||
import org.moqui.context.ExecutionContext | ||
import java.util.concurrent.Future | ||
Future<Map> instanceFuture = ec.service.async().name("${hostType.initService}").parameters([context:context,appInstanceId:appInstanceId]).callFuture() |
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.
What's the point of having calling this service async?
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.
@acetousk
The point of making this service async is to prevent user/client from getting stuck when the image is not available. In synchronous calls, the user would have to wait for the image to be pulled, which could take 6-8 minutes depending on the size. By using asynchronous calls, the user can request to start the container, and if the image is not available, it will be automatically pulled in the background while the user can continue with other tasks. This improves user experience and efficiency.
* Fix regression with partitioned tables in PostgreSQL PostgreSQL JDBC Driver introduced separating type for partitioned table from 40.2.12 pgjdbc/pgjdbc#1708 * Add subscreensItem.menuInclude to menu data (moqui#600) * Fixed the problem that moqui cannot be deployed as non-root webapp in Tomcat * Fixed a runtime error if Currency is BTC * Fixed a runtime error if Currency is BTC * Fixed the retries of Elastic Client * Add subscreensItem.menuInclude to menu data * Docker-Image-Pull Feature (moqui#553) * Improvement: In Moqui-Multi-Instance added a Async-Pull-Image-Feature which pulls the image by Using Docker-Engine-Api from multiple registry like AWS, Azure, Docker-Hub * Update AUTHORS * Added: added the generic way to process cmd , by adding an extra field(authTokenPass) inside the entity InstanceImage , now user has separate field for cmd and password so all types of registries is easily configurable * Update ServerEntities.xml by adding description * Library updates, including Jetty 10.0.13 to 10.015 which had reported vulnerabilities; there are lots of dependencies updated in this set, see diff for full details * In ScreenRenderImpl change addFormFieldValue() and related methods to handle first, second, and last rows, for qvt and other client rendered output that needs full data for a form in a map/object * In root build.gradle change gitStatusAll task to be more tolerant of repos with no master branch * Add text-area.@autogrow attribute, supported only in qvt for now * Update various libraries including Groovy to 3.0.19 (which has some minor non-backward compatible changes single 3.0.10 with odd boolean behavior in rare cases, adjusted for in the framework long ago but should be watched for in custom code), Jetty to 10.0.16, H2 database, SLF4J, SnakeYAML, Apache Commons Lang3 * In build.gradle gitStatusAll task also handle upstream remotes with no master branch * Currency (moqui#614) * Use moqui.basic.Uom entity to determine currency formatting and rounding details * Add currency-hide-symbol attribute as a complement to currency-unit-field, displaying the value without the currency symbol * Update authors file * Add and Handle Hmac Sha256 with timestamp * A couple of minor bug fixes in the EntityAutoServiceRunner and ContextJavaUtil (moqui#618) * In EntityAutoServiceRunner, remove unwanted break statement to ensure support for multiple PK fields with wildcard (*). * In ContextJavaUtil, add missing future keyword. * Updated authors file. * Allow for 10 second threshold in nowTimestamp * In L10nFacadeImpl.formatCurrency() use disableAuthz() for entity find on Uom; small change to currency formatting test to pass with current OOTB settings * In addons.xml, added new moqui-sso component. --------- Co-authored-by: Yao Chunlin <chunlinyao@gmail.com> Co-authored-by: David E. Jones <dej@dejc.com> Co-authored-by: Wei Zhang <zhangw@shinetechsoftware.com> Co-authored-by: Rohit pawar <72196393+rohitpawar2811@users.noreply.github.com> Co-authored-by: Jens Hardings <jhp@moit.cl> Co-authored-by: acetousk <acetousk@users.noreply.github.com> Co-authored-by: Ayman Abi Abdallah <aabiabdallah@gmail.com>
* Fix regression with partitioned tables in PostgreSQL PostgreSQL JDBC Driver introduced separating type for partitioned table from 40.2.12 pgjdbc/pgjdbc#1708 * Add subscreensItem.menuInclude to menu data (moqui#600) * Fixed the problem that moqui cannot be deployed as non-root webapp in Tomcat * Fixed a runtime error if Currency is BTC * Fixed a runtime error if Currency is BTC * Fixed the retries of Elastic Client * Add subscreensItem.menuInclude to menu data * Docker-Image-Pull Feature (moqui#553) * Improvement: In Moqui-Multi-Instance added a Async-Pull-Image-Feature which pulls the image by Using Docker-Engine-Api from multiple registry like AWS, Azure, Docker-Hub * Update AUTHORS * Added: added the generic way to process cmd , by adding an extra field(authTokenPass) inside the entity InstanceImage , now user has separate field for cmd and password so all types of registries is easily configurable * Update ServerEntities.xml by adding description * Library updates, including Jetty 10.0.13 to 10.015 which had reported vulnerabilities; there are lots of dependencies updated in this set, see diff for full details * In ScreenRenderImpl change addFormFieldValue() and related methods to handle first, second, and last rows, for qvt and other client rendered output that needs full data for a form in a map/object * In root build.gradle change gitStatusAll task to be more tolerant of repos with no master branch * Add text-area.@autogrow attribute, supported only in qvt for now * Update various libraries including Groovy to 3.0.19 (which has some minor non-backward compatible changes single 3.0.10 with odd boolean behavior in rare cases, adjusted for in the framework long ago but should be watched for in custom code), Jetty to 10.0.16, H2 database, SLF4J, SnakeYAML, Apache Commons Lang3 * In build.gradle gitStatusAll task also handle upstream remotes with no master branch * Currency (moqui#614) * Use moqui.basic.Uom entity to determine currency formatting and rounding details * Add currency-hide-symbol attribute as a complement to currency-unit-field, displaying the value without the currency symbol * Update authors file * Add and Handle Hmac Sha256 with timestamp * A couple of minor bug fixes in the EntityAutoServiceRunner and ContextJavaUtil (moqui#618) * In EntityAutoServiceRunner, remove unwanted break statement to ensure support for multiple PK fields with wildcard (*). * In ContextJavaUtil, add missing future keyword. * Updated authors file. * Allow for 10 second threshold in nowTimestamp * In L10nFacadeImpl.formatCurrency() use disableAuthz() for entity find on Uom; small change to currency formatting test to pass with current OOTB settings * In addons.xml, added new moqui-sso component. * Add AutoCloseable extension to EntityListIterator for use with try with resources, thanks to Deepak Dixit for the suggestion * BugFix EntityListIterator not closed in NotificationMessageImpl#getNotifyUserIds --------- Co-authored-by: Yao Chunlin <chunlinyao@gmail.com> Co-authored-by: David E. Jones <dej@dejc.com> Co-authored-by: Wei Zhang <zhangw@shinetechsoftware.com> Co-authored-by: Rohit pawar <72196393+rohitpawar2811@users.noreply.github.com> Co-authored-by: Jens Hardings <jhp@moit.cl> Co-authored-by: acetousk <acetousk@users.noreply.github.com> Co-authored-by: Ayman Abi Abdallah <aabiabdallah@gmail.com>
* commit 'b4287f1b461398b3f22fe96cc9c9761b693a5c07': Change EntityDataWriterImpl to use groovy CompileStatic, without this a compile error was missed in the changes for PR moqui#625, fix small issues from this Implemented withCloseable/try-with-resources where needed in the code… (moqui#625) BugFix EntityListIterator not closed in NotificationMessageImpl#getNotifyUserIds Add AutoCloseable extension to EntityListIterator for use with try with resources, thanks to Deepak Dixit for the suggestion In addons.xml, added new moqui-sso component. In L10nFacadeImpl.formatCurrency() use disableAuthz() for entity find on Uom; small change to currency formatting test to pass with current OOTB settings Allow for 10 second threshold in nowTimestamp A couple of minor bug fixes in the EntityAutoServiceRunner and ContextJavaUtil (moqui#618) Add and Handle Hmac Sha256 with timestamp Currency (moqui#614) In build.gradle gitStatusAll task also handle upstream remotes with no master branch Update various libraries including Groovy to 3.0.19 (which has some minor non-backward compatible changes single 3.0.10 with odd boolean behavior in rare cases, adjusted for in the framework long ago but should be watched for in custom code), Jetty to 10.0.16, H2 database, SLF4J, SnakeYAML, Apache Commons Lang3 Add text-area.@autogrow attribute, supported only in qvt for now In root build.gradle change gitStatusAll task to be more tolerant of repos with no master branch In ScreenRenderImpl change addFormFieldValue() and related methods to handle first, second, and last rows, for qvt and other client rendered output that needs full data for a form in a map/object Library updates, including Jetty 10.0.13 to 10.015 which had reported vulnerabilities; there are lots of dependencies updated in this set, see diff for full details Docker-Image-Pull Feature (moqui#553) Add subscreensItem.menuInclude to menu data (moqui#600) Fix regression with partitioned tables in PostgreSQL
* Fix regression with partitioned tables in PostgreSQL PostgreSQL JDBC Driver introduced separating type for partitioned table from 40.2.12 pgjdbc/pgjdbc#1708 * Add subscreensItem.menuInclude to menu data (moqui#600) * Fixed the problem that moqui cannot be deployed as non-root webapp in Tomcat * Fixed a runtime error if Currency is BTC * Fixed a runtime error if Currency is BTC * Fixed the retries of Elastic Client * Add subscreensItem.menuInclude to menu data * Docker-Image-Pull Feature (moqui#553) * Improvement: In Moqui-Multi-Instance added a Async-Pull-Image-Feature which pulls the image by Using Docker-Engine-Api from multiple registry like AWS, Azure, Docker-Hub * Update AUTHORS * Added: added the generic way to process cmd , by adding an extra field(authTokenPass) inside the entity InstanceImage , now user has separate field for cmd and password so all types of registries is easily configurable * Update ServerEntities.xml by adding description * Library updates, including Jetty 10.0.13 to 10.015 which had reported vulnerabilities; there are lots of dependencies updated in this set, see diff for full details * In ScreenRenderImpl change addFormFieldValue() and related methods to handle first, second, and last rows, for qvt and other client rendered output that needs full data for a form in a map/object * In root build.gradle change gitStatusAll task to be more tolerant of repos with no master branch * Add text-area.@autogrow attribute, supported only in qvt for now * Update various libraries including Groovy to 3.0.19 (which has some minor non-backward compatible changes single 3.0.10 with odd boolean behavior in rare cases, adjusted for in the framework long ago but should be watched for in custom code), Jetty to 10.0.16, H2 database, SLF4J, SnakeYAML, Apache Commons Lang3 * In build.gradle gitStatusAll task also handle upstream remotes with no master branch * Currency (moqui#614) * Use moqui.basic.Uom entity to determine currency formatting and rounding details * Add currency-hide-symbol attribute as a complement to currency-unit-field, displaying the value without the currency symbol * Update authors file * Add and Handle Hmac Sha256 with timestamp * A couple of minor bug fixes in the EntityAutoServiceRunner and ContextJavaUtil (moqui#618) * In EntityAutoServiceRunner, remove unwanted break statement to ensure support for multiple PK fields with wildcard (*). * In ContextJavaUtil, add missing future keyword. * Updated authors file. * Allow for 10 second threshold in nowTimestamp * In L10nFacadeImpl.formatCurrency() use disableAuthz() for entity find on Uom; small change to currency formatting test to pass with current OOTB settings * In addons.xml, added new moqui-sso component. * Add AutoCloseable extension to EntityListIterator for use with try with resources, thanks to Deepak Dixit for the suggestion * BugFix EntityListIterator not closed in NotificationMessageImpl#getNotifyUserIds * Implemented withCloseable/try-with-resources where needed in the code… (moqui#625) * Implemented withCloseable/try-with-resources where needed in the code to ensure proper closure of the entity list iterator resource * Fixed withCloseable syntax --------- Co-authored-by: David E. Jones <dej@dejc.com> * Change EntityDataWriterImpl to use groovy CompileStatic, without this a compile error was missed in the changes for PR moqui#625, fix small issues from this --------- Co-authored-by: Yao Chunlin <chunlinyao@gmail.com> Co-authored-by: David E. Jones <dej@dejc.com> Co-authored-by: Wei Zhang <zhangw@shinetechsoftware.com> Co-authored-by: Rohit pawar <72196393+rohitpawar2811@users.noreply.github.com> Co-authored-by: Jens Hardings <jhp@moit.cl> Co-authored-by: acetousk <acetousk@users.noreply.github.com> Co-authored-by: Ayman Abi Abdallah <aabiabdallah@gmail.com>
* Fix regression with partitioned tables in PostgreSQL PostgreSQL JDBC Driver introduced separating type for partitioned table from 40.2.12 pgjdbc/pgjdbc#1708 * Add subscreensItem.menuInclude to menu data (moqui#600) * Fixed the problem that moqui cannot be deployed as non-root webapp in Tomcat * Fixed a runtime error if Currency is BTC * Fixed a runtime error if Currency is BTC * Fixed the retries of Elastic Client * Add subscreensItem.menuInclude to menu data * Docker-Image-Pull Feature (moqui#553) * Improvement: In Moqui-Multi-Instance added a Async-Pull-Image-Feature which pulls the image by Using Docker-Engine-Api from multiple registry like AWS, Azure, Docker-Hub * Update AUTHORS * Added: added the generic way to process cmd , by adding an extra field(authTokenPass) inside the entity InstanceImage , now user has separate field for cmd and password so all types of registries is easily configurable * Update ServerEntities.xml by adding description * Library updates, including Jetty 10.0.13 to 10.015 which had reported vulnerabilities; there are lots of dependencies updated in this set, see diff for full details * In ScreenRenderImpl change addFormFieldValue() and related methods to handle first, second, and last rows, for qvt and other client rendered output that needs full data for a form in a map/object * In root build.gradle change gitStatusAll task to be more tolerant of repos with no master branch * Add text-area.@autogrow attribute, supported only in qvt for now * Update various libraries including Groovy to 3.0.19 (which has some minor non-backward compatible changes single 3.0.10 with odd boolean behavior in rare cases, adjusted for in the framework long ago but should be watched for in custom code), Jetty to 10.0.16, H2 database, SLF4J, SnakeYAML, Apache Commons Lang3 * In build.gradle gitStatusAll task also handle upstream remotes with no master branch * Currency (moqui#614) * Use moqui.basic.Uom entity to determine currency formatting and rounding details * Add currency-hide-symbol attribute as a complement to currency-unit-field, displaying the value without the currency symbol * Update authors file * Add and Handle Hmac Sha256 with timestamp * A couple of minor bug fixes in the EntityAutoServiceRunner and ContextJavaUtil (moqui#618) * In EntityAutoServiceRunner, remove unwanted break statement to ensure support for multiple PK fields with wildcard (*). * In ContextJavaUtil, add missing future keyword. * Updated authors file. * Allow for 10 second threshold in nowTimestamp * In L10nFacadeImpl.formatCurrency() use disableAuthz() for entity find on Uom; small change to currency formatting test to pass with current OOTB settings * In addons.xml, added new moqui-sso component. * Add AutoCloseable extension to EntityListIterator for use with try with resources, thanks to Deepak Dixit for the suggestion * BugFix EntityListIterator not closed in NotificationMessageImpl#getNotifyUserIds * Implemented withCloseable/try-with-resources where needed in the code… (moqui#625) * Implemented withCloseable/try-with-resources where needed in the code to ensure proper closure of the entity list iterator resource * Fixed withCloseable syntax --------- * Change EntityDataWriterImpl to use groovy CompileStatic, without this a compile error was missed in the changes for PR moqui#625, fix small issues from this --------- Co-authored-by: Yao Chunlin <chunlinyao@gmail.com> Co-authored-by: David E. Jones <dej@dejc.com> Co-authored-by: Wei Zhang <zhangw@shinetechsoftware.com> Co-authored-by: Rohit pawar <72196393+rohitpawar2811@users.noreply.github.com> Co-authored-by: Jens Hardings <jhp@moit.cl> Co-authored-by: acetousk <acetousk@users.noreply.github.com> Co-authored-by: Ayman Abi Abdallah <aabiabdallah@gmail.com>
* Master (#11) (#12) * Fix regression with partitioned tables in PostgreSQL PostgreSQL JDBC Driver introduced separating type for partitioned table from 40.2.12 pgjdbc/pgjdbc#1708 * Add subscreensItem.menuInclude to menu data (moqui#600) * Fixed the problem that moqui cannot be deployed as non-root webapp in Tomcat * Fixed a runtime error if Currency is BTC * Fixed a runtime error if Currency is BTC * Fixed the retries of Elastic Client * Add subscreensItem.menuInclude to menu data * Docker-Image-Pull Feature (moqui#553) * Improvement: In Moqui-Multi-Instance added a Async-Pull-Image-Feature which pulls the image by Using Docker-Engine-Api from multiple registry like AWS, Azure, Docker-Hub * Update AUTHORS * Added: added the generic way to process cmd , by adding an extra field(authTokenPass) inside the entity InstanceImage , now user has separate field for cmd and password so all types of registries is easily configurable * Update ServerEntities.xml by adding description * Library updates, including Jetty 10.0.13 to 10.015 which had reported vulnerabilities; there are lots of dependencies updated in this set, see diff for full details * In ScreenRenderImpl change addFormFieldValue() and related methods to handle first, second, and last rows, for qvt and other client rendered output that needs full data for a form in a map/object * In root build.gradle change gitStatusAll task to be more tolerant of repos with no master branch * Add text-area.@autogrow attribute, supported only in qvt for now * Update various libraries including Groovy to 3.0.19 (which has some minor non-backward compatible changes single 3.0.10 with odd boolean behavior in rare cases, adjusted for in the framework long ago but should be watched for in custom code), Jetty to 10.0.16, H2 database, SLF4J, SnakeYAML, Apache Commons Lang3 * In build.gradle gitStatusAll task also handle upstream remotes with no master branch * Currency (moqui#614) * Use moqui.basic.Uom entity to determine currency formatting and rounding details * Add currency-hide-symbol attribute as a complement to currency-unit-field, displaying the value without the currency symbol * Update authors file * Add and Handle Hmac Sha256 with timestamp * A couple of minor bug fixes in the EntityAutoServiceRunner and ContextJavaUtil (moqui#618) * In EntityAutoServiceRunner, remove unwanted break statement to ensure support for multiple PK fields with wildcard (*). * In ContextJavaUtil, add missing future keyword. * Updated authors file. * Allow for 10 second threshold in nowTimestamp * In L10nFacadeImpl.formatCurrency() use disableAuthz() for entity find on Uom; small change to currency formatting test to pass with current OOTB settings * In addons.xml, added new moqui-sso component. * Add AutoCloseable extension to EntityListIterator for use with try with resources, thanks to Deepak Dixit for the suggestion * BugFix EntityListIterator not closed in NotificationMessageImpl#getNotifyUserIds * Implemented withCloseable/try-with-resources where needed in the code… (moqui#625) * Implemented withCloseable/try-with-resources where needed in the code to ensure proper closure of the entity list iterator resource * Fixed withCloseable syntax --------- * Change EntityDataWriterImpl to use groovy CompileStatic, without this a compile error was missed in the changes for PR moqui#625, fix small issues from this --------- Co-authored-by: Yao Chunlin <chunlinyao@gmail.com> Co-authored-by: David E. Jones <dej@dejc.com> Co-authored-by: Wei Zhang <zhangw@shinetechsoftware.com> Co-authored-by: Rohit pawar <72196393+rohitpawar2811@users.noreply.github.com> Co-authored-by: Jens Hardings <jhp@moit.cl> Co-authored-by: acetousk <acetousk@users.noreply.github.com> Co-authored-by: Ayman Abi Abdallah <aabiabdallah@gmail.com> * Add sentDate field to WikiBlogCategory entity --------- Co-authored-by: Yao Chunlin <chunlinyao@gmail.com> Co-authored-by: David E. Jones <dej@dejc.com> Co-authored-by: Wei Zhang <zhangw@shinetechsoftware.com> Co-authored-by: Rohit pawar <72196393+rohitpawar2811@users.noreply.github.com> Co-authored-by: Jens Hardings <jhp@moit.cl> Co-authored-by: acetousk <acetousk@users.noreply.github.com> Co-authored-by: Ayman Abi Abdallah <aabiabdallah@gmail.com>
I have created the Docker-Image-Pull feature in which on clicking the INIT button it will fetch the Docker image mentioned according to credentials and also init Initialise instance in Async,by refresh you can check the status.
Updated Changes :
EX-: