Skip to content
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

P2 Test Preview Image using the stack #13

Closed
robe070 opened this issue Jul 14, 2020 · 16 comments
Closed

P2 Test Preview Image using the stack #13

robe070 opened this issue Jul 14, 2020 · 16 comments
Assignees

Comments

@robe070
Copy link
Owner

robe070 commented Jul 14, 2020

Ref: Testing Preview Template or Preview Image

  1. Create a PowerShell script to test that the template and all images function correctly in either a specific Region or all supported Regions.
  2. For Phase 1, the template is in Azure Quickstart and the image is in Azure Marketplace. The purpose is to ensure that a customer may instantiate the LANSA stacks. So the template will not be run from the LANSA git repository. It must be the template here.
  3. For Phase 2 and later, the template and the image are both in Azure Marketplace.
  4. Test that the image used by the VMSS is the correct one. This information may be seen in the portal. If the image is meant to be in preview then the Offer will be lansa-scalable-license-preview. If the image is in production then the Offer will be lansa-scalable-license. If its a Custom Image the developer will need to ascertain themselves what the values should be. The SKU is the text version of the Plan Id. Presumably the Powershell cmdlet will use the Plan ID. For the current image the Plan ID does not match the image name. The Plan ID is lansa-scalable-license-14-2. For all other images it is the Image Name minus the version number. Refer to the table in P4 Azure Plan & Image Naming #4 for the mapping.
    image
  5. A specific Region may be selected or all supported Regions
  6. A specific image may be selected or multiple images in preview
  7. Selecting one Region with one image is envisaged to be used for initial testing or basic testing that the preview works correctly. Once that passes to test all Regions and all Images.
  8. All stacks will be created in parallel.
  9. The tests to be run on each stack are defined in Testing Image and Template Before Submission to AMP.
  10. All test output to be provided to the Architect for checking.
@robe070 robe070 changed the title Test Preview Image Test Preview Image using the stack Jul 14, 2020
@robe070
Copy link
Owner Author

robe070 commented Aug 2, 2020

@VarunChopraAccolite @ashutosh-kumar1
As you haven't yet written the script which this Issue presumes exists, manually test the preview in 3 Regions.

  1. Australia East
  2. US East
  3. West India

Use the template in its original condition and ensure you chose the PREVIEW option for the imageOffer parameter. This will require modifying the test.parameters.json file to use lansa-scalable-license-preview for imageOffer.

Also use the production git branch. The default value in the template. So remove gitBranch from test.parameters.json. In the future the feature branch needs to be merged into debug/paas for testing so that the code base is stable. For now there should not have been any changes to the template scripts in git so its safer to stay with whats already released.

I also think it may be best for the 2 new Regions to let the template create the database rather than manually setup the database server in those Regions. So for those 2 Regions, set databaseNewOrExisting to new and remove the databaseName and databaseServerName parameter values.

@ashutosh-kumar1
Copy link

Hi @robe070 ,
I tried deploying the template for marketplace preview image but it failed with an error message 'Marketplace purchase eligibilty check returned errors'. Attaching the complete error log. Could you please have a look at it? Is there any rights that need to be provided? Is there any additional cost involved (concern)?
error file for marketplace deployed image.txt

I had created a new vmss with name 'rgakvmss' and new database with name 'test-ak1' and provided them as deployment parameters. Attaching screenshot for the diffs too
diff screenshot

@robe070
Copy link
Owner Author

robe070 commented Aug 5, 2020

Its quite clear what the issue is:
You have not accepted the legal terms on this subscription: '739c4e86-bd75-4910-8d6e-d7eb23ab94f3' for this
plan. Before the subscription can be used, you need to accept the legal terms of the image. To read and accept legal terms, use the Azure CLI
commands described at https://go.microsoft.com/fwlink/?linkid=862451 or the PowerShell commands available at
https://go.microsoft.com/fwlink/?linkid=2110637. Alternatively, deploying via the Azure portal provides a UI experience for reading and accepting
the legal terms. Offer details: publisher='lansa' offer = 'lansa-scalable-license-preview', sku = 'lansa-scalable-license-14-2'

Just go to the portal and create a VM from the preview image.

@robe070
Copy link
Owner Author

robe070 commented Aug 5, 2020

@ashutosh-kumar1 I have created the VM for you. You will now be able to create the stack.

When creating a stack the directive is:

  1. Always use an empty Resource Group unless you are re-deploying exactly the same stack.
  2. Never manually create a database server or Database in any Resource Group apart from Shared
  3. The idea is that the Resource Group contains only the resources that the stack creates. No more. No less. Then you know you can remove everything the stack has created by simply deleting the entire resource group.

So, I've deleted your Resource Group and you can create a database in Shared using the existing Database Server

@ashutosh-kumar1
Copy link

ashutosh-kumar1 commented Aug 5, 2020

@robe070 , Thanks for creating a dummy-VM. I was able to deploy the template using the market place preview image in Australia East location. Can you tell me the necessity of creating a VM from the preview image?

@ashutosh-kumar1
Copy link

@VarunChopraAccolite @ashutosh-kumar1
As you haven't yet written the script which this Issue presumes exists, manually test the preview in 3 Regions.

  1. Australia East
  2. US East
  3. West India

Use the template in its original condition and ensure you chose the PREVIEW option for the imageOffer parameter. This will require modifying the test.parameters.json file to use lansa-scalable-license-preview for imageOffer.

Also use the production git branch. The default value in the template. So remove gitBranch from test.parameters.json. In the future the feature branch needs to be merged into debug/paas for testing so that the code base is stable. For now there should not have been any changes to the template scripts in git so its safer to stay with whats already released.

I also think it may be best for the 2 new Regions to let the template create the database rather than manually setup the database server in those Regions. So for those 2 Regions, set databaseNewOrExisting to new and remove the databaseName and databaseServerName parameter values.

@robe070 I tried manually executing the script for the mentioned regions. I was successfully able to execute the script for US East and Australia East locations but it failed for West India with the attached 'invalid template deployment error'. Couldn't figure out why the template was valid for the other two regions but not for the 'West India' region.
west india deployment error.txt
Can you please provide any feedback on this?

@robe070
Copy link
Owner Author

robe070 commented Aug 6, 2020

Just go to the url provided in the error message and you'll get your answer: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/error-sku-not-available

The VM Size is almost certainly invalid.

Use the technique described in the url to determine what IS available to you in that region. Make sure you check both VM Sizes.
I will create an Issue to modify the template to use defaults that are available in all regions.

@robe070
Copy link
Owner Author

robe070 commented Aug 6, 2020

@robe070 , Thanks for creating a dummy-VM. I was able to deploy the template using the market place preview image in Australia East location. Can you tell me the necessity of creating a VM from the preview image?

As the error message describes, the baking Images subscription needed to be subscribed to the preview. That occurs when you create a VM from it in the Azure Portal. Its possible to do it from Powershell, but its a one off and quick to do so its unnecessary to code for it. It will never need to be subscribed to again for subsequent versions. Its now subscribed to the Offer/SKU combination.

It may be that I've subscribed to the complete Offer, If so the following will not need to be done... When the image is published into production, I'll need to repeat the exercise. And again when the new images are created for preview and production.

@ashutosh-kumar1
Copy link

@robe070 I have tested the deployment of the preview image manually in the 3 locations: Australia East, US East and France Central. The resource groups are present in the Azure portal for your reference (named as rgak). Meanwhile, I am creating a script to do the same as per this issue and will start working on the solution template thereafter.

@robe070
Copy link
Owner Author

robe070 commented Aug 7, 2020

I have checked your tests as it was not possible for you to provide test results easily as they are not yet automated. They all run successfully. I am now publishing the image.

@robe070 robe070 closed this as completed Aug 7, 2020
@robe070
Copy link
Owner Author

robe070 commented Aug 7, 2020

I've realised that even though the image has passed the tests, the script thats required of this Issue has not yet been completed. So I've move it to Phase 2.

@robe070 robe070 reopened this Aug 7, 2020
@robe070 robe070 changed the title Test Preview Image using the stack P2 Test Preview Image using the stack Aug 7, 2020
@github-actions
Copy link

github-actions bot commented Aug 7, 2020

Heads up - this issue was moved between project columns. cc @VarunChopraAccolite, @ashutosh-kumar1

@ashutosh-kumar1
Copy link

@rob, I have already started automating the script for testing the preview image. Parallelly I have also written a test script to test the 4 URLs mentioned in issue #7. The only thing left in it is to get the lbfqdn value which is pending.
I did go through the priority tickets and to deliver the issues based on priority, I am picking issue #33 right away. Will continue on it as the priority demands.

@github-actions
Copy link

Heads up - this issue was moved between project columns. cc @VarunChopraAccolite, @ashutosh-kumar1

@VarunChopraAccolite
Copy link

hi @robe070
The Image Release Pipeline Release 36 covers 2012, 2016 images and Release 37 covers 2019 images. The Preview tests are run in these releases. Please find the SS for the same.

image

Thanks

@robe070 robe070 closed this as completed Aug 31, 2020
@github-actions
Copy link

github-actions bot commented Sep 1, 2020

Heads up - this issue was moved between project columns. cc @VarunChopraAccolite, @ashutosh-kumar1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants