Skip to main content
Solved

Automation of upgrading applications - copying applications applying roles in IAM

  • September 7, 2021
  • 3 replies
  • 94 views

Hugo Nienhuis
Superhero
Forum|alt.badge.img+12

I would like to automate all steps in upgrading our applications. I have found very interesting tips and tricks so far, inclusing using the post-sync-code, TW Deployer and using Octopus, but what I would like to automate now is the following steps in IAM:

  1. Copy the latest active application ( task_create_gui_appl_from_gui_appl ? )
  2. Apply roles to newest application
  3. Apply user rights to newest application on the database
  4. Apply user rights to IAM

So basically all steps we normally perform on the IAM manually. Are there any scripts / tasks available to do so? Basically all applications have the same roles, only the users will be different for the applications.

Best answer by Mark Jongeling

Hi Hugo,

Within my team, to create a deployment package we do make use of the Post synchronization code to do some automatic things for us. As we work on the IAM application we need to make sure a server is present in the table server, so we add it if not present. besides that we indeed use the task_create_gui_app_from_gui_appl task to copy an existing application to a new one - in our case copying IAM's previous version to the new version. We then also update some information in the gui_appl table. If there's no entry in gui_appl, we create one by code, while also inserting a translation for it. Thereafter we remove the old version by utilizing the task_delete_project_vrs task.

The Post synchronization code is very handy for deploying applications and doing things automatically.

In your case, it would then be:

  1. exec task_create_gui_appl_from_gui_appl
  2. When copying the application from the previous version, it also copies the roles if you want: 
    Copy application
    1. I guess you mean Apply roles to database?
      Apply roles to database
      This is a GUI code task so sadly not available to execute from Post synchronization script.
    2. Still need to apply roles? Because copying roles from the previous version is probably enough

Hope this helps!

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

3 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3936 replies
  • Answer
  • September 20, 2021

Hi Hugo,

Within my team, to create a deployment package we do make use of the Post synchronization code to do some automatic things for us. As we work on the IAM application we need to make sure a server is present in the table server, so we add it if not present. besides that we indeed use the task_create_gui_app_from_gui_appl task to copy an existing application to a new one - in our case copying IAM's previous version to the new version. We then also update some information in the gui_appl table. If there's no entry in gui_appl, we create one by code, while also inserting a translation for it. Thereafter we remove the old version by utilizing the task_delete_project_vrs task.

The Post synchronization code is very handy for deploying applications and doing things automatically.

In your case, it would then be:

  1. exec task_create_gui_appl_from_gui_appl
  2. When copying the application from the previous version, it also copies the roles if you want: 
    Copy application
    1. I guess you mean Apply roles to database?
      Apply roles to database
      This is a GUI code task so sadly not available to execute from Post synchronization script.
    2. Still need to apply roles? Because copying roles from the previous version is probably enough

Hope this helps!


Hugo Nienhuis
Superhero
Forum|alt.badge.img+12
  • Author
  • Superhero
  • 136 replies
  • September 21, 2021

Thanks Mark. I will use this to automate our deployment. The only thing that worries me is that I will have to check the task_create_gui_app_from_gui_appl after each upgrade. If functions like these would be supported in some way, or described within documentation and/or release notes if changed, they would be more accessible and safe to be used by external developers/deployers I think.

 

But thanks neverless :-)


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3936 replies
  • September 21, 2021
Hugo Nienhuis wrote:

Thanks Mark. I will use this to automate our deployment. The only thing that worries me is that I will have to check the task_create_gui_app_from_gui_appl after each upgrade. If functions like these would be supported in some way, or described within documentation and/or release notes if changed, they would be more accessible and safe to be used by external developers/deployers I think.

 

But thanks neverless :-)

Good idea, I will communicate this internally. We can certainly explain more about all the functions and procedures available.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings