Closed lurock closed 5 years ago
We do not support running SF inside a container as container does not support driver installation. This is why installation failed in the driver install step.
@lurock - could you provide some information on your scenario? Do you want to run service fabric inside the container or you want to deploy / connect to another cluster from the container?
I would like to use the container on my build server to build the package, connect to the cluster and deploy to the package to the cluster. I would rather not install the SDK on my build server directly.
This is the same direction we (and I assume many others) are going. Building in docker containers! @lurock doesn't seem to be advocating actually running from the container, just needing the SDK. Unfortunately you need the runtime installed in order to install the SDK.
We have several teams running different versions of the SF SDK. Docker build agents make it simple for us to provide precise build environments tailored to their needs and SDK version without disrupting other teams.
My teams also have a need to build SF applications in Docker containers. Our build servers are limited on VMs due to VM overhead but can spin up containers on demand to meet load. The whole CI pipeline is Docker-based and we are having difficulty supporting SF builds. Ideally we'd like to be able to stand up a dev cluster in a Docker container as well for integration / acceptance testing.
Any movement on this?
@bryanlikes I've been able to stand up Docker containers to perform builds, but that's because I am building with the .NET Core CLI. It seems the SDK is largely needed for the runtime and deployment activities. I do have some unit tests that are failing (we run these on the containers) due to missing FabricCommon.dll. I haven't spent time to try to get past that hurdle.
So we are currently running our CI containers for the builds of individual Actor/Service projects and have VMs assigned for builds / tests / deployment with the .sfproj targets. It's not ideal to say the least. Any feedback from the Service Fabric team would be great.
@Flern, thanks for the reply. That solution seems to miss the benefits of containerized build environments.
We actually had this working great with older version of ServiceFabric and SDK at 5.5.216.0 and 2.5.216. New requirements forced us to move to latest versions of SF and this caused our existing build infrastructure based on containers to be essentially scrapped since we could not create docker images with the newer SF SDK. We also had to use a separate windows server for service fabric app builds which costs more and is less flexible.
@rishirsinha and @VipulM-MSFT Has any discussion taken place on the SF team regarding the desires of many people to deploy SF applications using our container-based CI pipelines? A new version of the SDK and runtime are out and I see no mention of changes to support this in the release notes.
@rishirsinha You mention you don't support installation inside docker containers, but apparently that only goes for windows and not linux, because a "onebox" cluster docker image is available here:
https://hub.docker.com/r/microsoft/service-fabric-onebox/
Are you seriously telling me that i have to move my CI to a Linux based system? We are currently using Appveyor which can only run Windows containers. But apparently i would be able to run my SF tests against a local cluster in say Wercker (linux container based CI)?
@petertiedemann
Yes, my apologies on that. The non-support of SF runtime install inside container is limited to windows. The reason for that is the presence of kernel drivers in windows which are not easy to move away from. We have looked at containerizing SF runtime for windows as well, but the timeline for that is not finalized.
@rishirsinha Is there anyway to install SF sdk without the runtime kernel drivers (I assume they are not needed for building and deploying SF applications). I have no desire to run the SF applications in a docker container, just build and deploy.
Adding @VipulM-MSFT who is working on enabling this soon.
@VipulM-MSFT Do you have any estimate on when it will be possible to install SF SDK in a windows docker container?
@VipulM-MSFT @rishirsinha
Any updates?
@VipulM-MSFT @rishirsinha
Any updates?
@VipulM-MSFT @rishirsinha
Any updates?
I would love to see some progress on this, since we are looking into moving our website (currently around 40 servers) over to Service Fabric and our build/deployment system is Docker based. We don't need to run Service Fabric in Docker, so the runtime isn't a requirement for us. It would be fantastic to be able to install the SDK and be able to deploy to an Azure SF cluster (basically run Publish-NewServiceFabricApplication) from a container.
I'm curious if anyone has found a work around, perhaps bypassing the installer and manually copying the SDK into a container. I'm also wondering if Service Fabric Mesh would help in this scenario, since we are considering moving over to that once it's stable.
Hi all. I've posted my manual solution up on Stack Overflow. Hope this unblocks people until Microsoft is able to improve their installer.
Thank you for your patience on this. We are working on improving the CI/CD scenarios. Today CI/CD is possible through Azure DevOps (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-tutorial-deploy-app-with-cicd-vsts); however the SDK cannot be installed in the container.
We are making investments on various fronts:
A) Ensure that Service Fabric runtime can be installed in the container. (Work items identified and in progress)
B) Separate the Service Fabric SDK from the Runtime (Investigations phase to identify the full set of work items) While this item is in progress, we are considering providing a pre-baked image with Service Fabric SDK (without the runtime) installed that allows you to build and deploy Service Fabric apps.
C) Separate the client library and tools (including the PowerShell) from the runtime requirements.
This allows deploying and managing Service Fabric applications without requiring runtime. We now have following components:
Implement and document all Service Fabric Client APIs over HTTP / REST (Completed).
Provide .NET core client library for these APIs (In Preview) (https://github.com/Microsoft/service-fabric-client-dotnet)
Provide .NET core PowerShell module based on the client library (In progress, will be published as preview shortly)
@MikkelHegn and @raunakpandya
I'm labelling this as a set of enhancements and will follow-up when we have a milestone for the set of features defined above.
Service Fabric SDK 3.3.617 released as part of Service Fabric 6.4 can now be installed in container to build and deploy Service Fabric projects.
The example Dockerfile based on the VS 2017 build tools is available at: https://github.com/VipulM-MSFT/service-fabric-sdk-container/blob/master/3.3.617/Dockerfile
Here is an example repository configured with AppVeyor https://github.com/VipulM-MSFT/service-fabric-windows-patch-installer to build Service Fabric project.
@VipulM-MSFT Tested this and it's working for us! Thanks so much for fixing this!
Here is my docker file:
The build of this container is failing on installing the Service Fabric Runtime. Here is the FabricSetupLog.log output from installing the Service Fabric Runtime: