Comments (4)
Discussion results:
- 2 CI processes for different scenarios
- One for any_fork/Moodle:any_branch to Azure/Moodle:develop
- Just do some basic linting, syntax checking, fork/repo:branch naming checking
- Runs on every PR from any external contributors (of course within Azure/Moodle as well)
- The other for Azure/Moodle:develop to Azure/Moodle:master
- We do the ARM template validation ('az group deployment validate ...' -- this is very cheap and best be done in the above, but this even requires Azure credentials, so...) and actual ARM template test deployment ('az group deployment create ...').
- This test deployment should not only check if ARM returned successfully, but also check if the deployed site is reachable and functioning.
- We might even run some automated short load testing to the deployed Moodle site with our existing load testing scripts.
- This can be triggered manually when merging Azure/Moodle:develop to Azure/Moodle:master, or periodically (e.g., daily).
- We do the ARM template validation ('az group deployment validate ...' -- this is very cheap and best be done in the above, but this even requires Azure credentials, so...) and actual ARM template test deployment ('az group deployment create ...').
We can still use Travis CI, and probably minimize our compute cost for the test deployments and load testing as well.
from moodle.
@hosungs
There has been work done on this that you can see in progress here: https://github.com/catalyst/Azure_moodle/tree/issue72_travis-ci
For any fork or pull request linting of the templates is done. This also includes code styling. Both Styling and Linting is done via JS hint.
If the correct Environment variables are set in Travis CI for the repository, the stack template is also validated and deployed (including Moodle) using the Azure CLI. The created stack is removed as part of the script clean up. So even on failure there are no resources left in Azure to cost money. This also means that individual developers can use their own Azure accounts for testing prior to a pull request if they want.
A good place to start is the .travis.yml file to see how things are done.
It is now looking like we will need to switch from the Azure CLI tools to the Python Azure SDK, in order to achieve the requirement. Notably we need to capture the output of the az group deployment create
command, parse it and extract relevant Moodle details so we can test that Moodle was actually setup and operational. This is going to be easier than wrestling the output of the CLI using Bash.
Another issue that will be solved by moving from the Azure CLI to the Python SDK. If logging is set to minimal for the create process, Travis can time out the process as there are steps that don't output anything for more than 10minutes. Travis treats this as a failure condition. If logging is set to be verbose, the create process outputs more than 4MB of console output. Travis treats this as a failure condition.
from moodle.
Thanks @mattporritt for your detailed description. I'll go over your PR very soon, and I just wanted to mention what we discussed over the call yesterday. Switching to the Azure Python SDK is a good idea and I fully support it for future benefits. I also wanted to mention that if that switch takes longer than desired, we can keep using Azure CLI with the following alternatives:
az group deployment create
accepts the--no-wait
flag that will make the command return immediately, not waiting for the long deployment operation to finish.- Then we can use
az group deployment show
to periodically poll the status of the deployment and also extract the successful deployment's output (same asaz group deployment create
).
I understand that this will add some non-trivial logic (polling, breaking, ...) to the shell command, which better be done in a better programming environment like Python. Just mentioning this that we'd want to evaluate all the available options and pick the right and also the most efficient solution.
from moodle.
Sorry for not waiting for your Python SDK-based implementation, but I had to go ahead and implement the async initiation and periodic polling using bash anyway, as I was testing this CI from my side. Please see the latest master branch for the updates.
from moodle.
Related Issues (20)
- Url domain HOT 1
- Amazing - Job well done. HOT 1
- URGENT - The Large Size ARM template pointing this repo doesn't deploy.... HOT 2
- The Large templates deploys MySQL 5.6.47.0 but the template claims it's 5.7 HOT 3
- concurrent users on moodle HOT 4
- Moodle 4.1 HOT 10
- Failed to install Azure CLI on the Load Test VM
- Failed to install jmeter
- Your deployment failed HOT 18
- Moodle on AKS slow with Azure File and no file when using Azure blob HOT 4
- Your deployment failed HOT 2
- After Migrate Existing Moodle in this template site response very slow
- Mount failed When choose fileserver type Gluster HOT 5
- Deployment template validation failed: 'The template parameters 'osDiskSizeInGB' in the parameters file are not valid; HOT 1
- Creation of instances failed HOT 2
- feature request - azure WAF and/or azure frontdoor HOT 1
- feature request - moodle deployment with HA/DR on pair region
- Deployment failure for Moodle 4.1 and PHP 7.4 template Large-ha HOT 2
- Moodle on Azure App Service
- Resource Failed deployment HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moodle.