Cannot Install Umbraco in any environment besides ...
# help-with-umbraco
m
I need to set up an Umbraco install in Azure, preferably in an app service. I KNOW that this is possible, but every method I have tried fails. The CLI method fails with an error about not being able to find or use the dev-certs because the cert cannot be moved to the /My certificate store on an App Service. This can be fixed on a local machine by using certmgr.msc...which is not available in an App Service environment. I have tried using (environment) templates in Azure that are provided by MS, same difficulty. (I was able to get a very simple Umbraco 7 environment set up in Azure from an MS template, but that isn't helpful aside from proving that it can be done.) I have scoured the internet for weeks looking for a solution. I have read the docs repeatedly. I have watched tutorials repeatedly. None of them work. No one can solve why a 4-5 line command set fails so utterly. I have also attempted to build out a container to put into AKS. However, I barely know how to deal with Docker, and there are no tutorials that go deep enough for the Docker-deficient. I have been a systems guy for 25 years. I have never been unable to install/configure any software on any platform...until now. Have any of you successfully built out an Umbraco instance in Azure? How did you do it? What am I missing? Thanks in advance for any help that you may be able to provide.
m
Hi, manually I always have a fight πŸ˜„ (probably me) but with ci/cd it all works. What errors if any are you getting? Shouldn't matter too much but v13 or v14?
m
I have set up an Azure App Service running Windows with .NET8. (version 8.0.205) I then get into the .NET/Umbraco portion. The following commands work as expected: > dotnet new install Umbraco.Templates > dotnet new umbraco --name TestProject > cd TestProject However, the run command fails with a huge output, but the operative part appears to be: > Unhandled exception.[17:10:10 ERR] Hosting failed to start > System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date. > To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'. Running the suggested commands also fail: > C:\home\site\wwwroot\TestProject>dotnet dev-certs https > There was an error saving the HTTPS developer certificate to the current user personal certificate store. > > C:\home\site\wwwroot\TestProject>dotnet dev-certs https --check > No valid certificate found. > > C:\home\site\wwwroot\TestProject>dotnet dev-certs https --trust > Trusting the HTTPS development certificate was requested. A confirmation prompt will be displayed if the certificate was not previously trusted. Click yes on the prompt to trust the certificate. > There was an error saving the HTTPS developer certificate to the current user personal certificate store. I have tried with 13 and 14 both.
I did also change the environment variables as shown in the docs, but since the kestrel server won't even start it doesn't really matter
m
Ok so those templates will work locally but to run them in Azure you will want to do a dotnet publish and upload the resulting published folder
The HTTPS certificate sounds like a permissions issue on your machine, hopefully one you can Google as it's a dotnet command and not directly Umbraco
m
Yeah....that is the difficulty. I have googled that repeatedly and found no answers that help. That said, your comment about dotnet publish is not one I have seen yet. I'll have to look into that a bit. Thanks!
e
Wouldn’t it be move logical to publish your local environment to Git(Hub) and let Azure App Services CI/CD from there?
m
I suppose it would at that! Thanks for the push @EddieDemon
e
I may say a logical thing once or twice a year. πŸ˜‚ Best of luck!
m
don't forget the azure app_service specific best practise settings.. πŸ˜‰ https://docs.umbraco.com/umbraco-cms/fundamentals/setup/server-setup/azure-web-apps
3 part series here too (though older umbraco and using azure devops).. https://skrift.io/authors/aaron-sadler/ First part might have some interesting pointers for app_service setup and additions...
m
Welp, @EddieDemon, I cannot even install it on my local machine. The errors are different, but the result is the same.
e
Even the clean new project template?
m
@Mike Chambers I have tried all that stuff, but it's really not relevant because I can't get umbraco even installed
Yup
Also, please note that I am NOT a developer. I'm an Azure guy trying to set things up FOR developers
p
We use ManagedCloudNines.com for our complex Umbraco environments. Might be worth a call.
m
I appreciate that, but this is intended to be an evaluation of the platform. As such, paying for hosting is not something I can make happen. Further, this is a base install. Nothing complex about it!
m
I guess it depends what you mean by setting up for developers.. For us that would mean a starting point installing all locally.. https://docs.umbraco.com/umbraco-cms/fundamentals/setup/requirements#local-development + https://docs.umbraco.com/umbraco-cms/fundamentals/setup/install#install-umbraco-using-cli We'd also set up against a localdb/sqlexpress db instance. Which can then be replicated up to and azureSql instance. Then source code is pushing that to a git repo.. then having a git action to build and publish and deploy to a prepared azure app_service. (making sure the tech stack matches what is needed eg netcore 8+) As it's an azure_service the enironment vars and connectin string can be set in the portal config. Prob all this is telling you to suck eggs so sorry.. πŸ€“
m
Only a little bit. All the devs already have local copies installed. I'm the weirdo who can't get it right!
m
are they working off a git repo?
and local sqllite?
m
not as yet. Even better, one of them packaged up their install and sent it to me. It fails to install as well with some weird .NET8 errors
m
but there isn't an install.. for when you come to deploy on app_service.. it's a
dontnet publish
and copy up the files required to only run...(if you're going manual)
and you'll need a base DB from the dev. to set up as your datastore on azuresql..
you can have you dev run
dotnet publish -o {some file path}
and give you the resulting folder?
that will create a production release.
and as I say get a db bacpac from them too,
m
hrm...and then I would deploy that publish to a pre-configured AppService?4
m
deploy as in copy that folder to the site/wwwroot on the app_service.
prob via Kudu if you are going manual πŸ™‚
m
OK. Yes, likely manual. Github deploy actions take FOREVER
Thanks for the help @Mike Chambers, I've got a few things to try now
m
git hub deploying for us is a few minutes.. πŸ˜‰
and that's with nuget restore, build, unit test, deploy ... (some pre and post deploy custom things too)
to a loadbalanced setup
app_service on azure, I'd say use blob storage for media too.. (if you haven't already come across that)
and media not in the repo...
as can then be shared across environments.
you can also have the app_service set up to do the automated deployment.. (rather than github actions)
sets up a webhook into github ot bitbuket to watch a branch and run a deploy.cmd on azure
m
you're using webapps-deploy? When I did that it published the ENTIRE 600MB repo for a 1-line code change
took 45 minutes
m
Copy code
name: 'Run Azure webapp deploy action using publish profile credentials'
      uses: azure/webapps-deploy@v2
sounds like all your media might be in that repo?
m
Honestly, I cannot recall. It was a long while ago and for $itecore
m
prob best to get things working first.. and then CI/CD setup later πŸ™‚
m
indeed...it's a separate problem. You seem to have some insights though!
m
best of luck!
d
Yeah you can’t compare the build/deployment times between Sitecore and Umbraco. There are so many differences. Umbraco is usually a single server, or a load-balanced pair, and an admin server. Sitecore is CD, CM, ID, (not to mention Solr, Xconnect, etc..). Umbraco is a single db. Sitecore has maybe 8? I can’t remember how many ancillary Sitecore has. Been working on XP projects mostly
23 Views