Deploying Multiple Sites to a Single Azure Web Role
We are currently deploying multiple websites to a single Azure web role by including multiple site nodes in our .csdef file. Each site node references a physical directory where the files for the site, to be deployed, are located. Is there a way to handle this scenario in appveyor? In Jenkins, we have separate build jobs for each site. Once a build completes, it publishes the artifacts to a folder that the .csdef file references. We then trigger a build on a deployment job which deploys all the sites that are listed in the .csdef file.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ilya Finkelshte... on 11 Aug, 2016 08:40 PM
Hi Eric,
Sorry for some delay. In general answer is yes, but not automatically out of the box. To advise you on how better implement it, we need little more information.
Does all sites are projects within the same solution, or they are separate solutions?
Thank you,
Ilya.
2 Posted by Eric Mooney on 11 Aug, 2016 08:43 PM
They are in separate solutions. We have a solution that has the cloud project in it and then the sites are in their own solutions.
3 Posted by Ilya Finkelshte... on 11 Aug, 2016 09:28 PM
Also – are they in the same repository on GitHub (or other repository hosting service) or each solution is separate repository?
4 Posted by Eric Mooney on 11 Aug, 2016 09:30 PM
They are in seperate repos on bitbucket.
5 Posted by Ilya Finkelshte... on 12 Aug, 2016 07:23 PM
Hi Eric,
There are few different scenarios you can look at, depending on what event should trigger whole orchestration. Let’s assume it should be change in one of websites.
Here is what you can do:
1. Create project on Appveyor for each repository including all Websites and Cloud Service project.
2. For each Website project configure packaging of artifacts - https://www.appveyor.com/docs/packaging-artifacts
3. Configure each Website project to trigger Cloud Service build with API https://www.appveyor.com/docs/api/projects-builds as a post build action
4. Configure Cloud service project to uploads all artefacts locally (https://www.appveyor.com/docs/api/samples/download-artifacts-ps) as before build action
5. Configure Cloud service project deployment http://www.appveyor.com/docs/deployment/azure-cloud-service
So scenario will look like this:
- Each web project build is triggered by Bitbucket change
- When web project build finishes, it triggers build of Cloud Service project
- Cloud service project uploads all artefacts locally, builds and deploys
Another option is to start build of all web projects from Cloud service project with API, then download artifacts, build and deploy. Problem with it is that it will always build everything, even when part of sites were not changed. Also it is not clear what event will trigger this build.
And one more option is to have just single Cloud service project from which you can write script to clone and build Web projects locally as part if before build action. It’s advantage os simplicity in terms of minimum number of appveyor projects, but you are losing separate managing, logging and troubleshooting for each project. Also it has all disadvantages of previous option.
Please let us know if it was helpful.
Thank you,
Ilya.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:07 AM.