Is there any way to manually configure a Hosted Macos agent in Azure Devops? I mean, download the agent, install several dependencies, applications, frameworks and utilities to build the application that I need and then upload this image to use it in my agent pool. As I can see, just only predefined agents with predefined softwares are available.
No, it's not able to do this. Software on Microsoft-hosted agents is updated once each month.
For detail software and frameworks on hosted Mac OS image you could refer this link.
Microsoft-hosted agents do not offer:
The ability to log on.
The ability to drop artifacts to a UNC file share.
The ability to run XAML builds.
Potential performance advantages that you might get by using
self-hosted agents which might start and run builds faster.
If Microsoft-hosted agents don't meet your needs, then you should deploy your own self-hosted MacOS agents.
Related
I have been trying to convert my express app with a backend that requires specific dependencies that users need to access to be an offline app on Windows, which is currently distributed online by building a docker image out of it and deploying it to Google Cloud Run.
My plan was to use electron and let the installer force the users to install Docker Desktop since the application requires dependencies that are only available in Ubuntu (and in this way, I only need to use my Docker image to distribute it).
I know that it is a bad idea to let users install Docker. And I am here, after researching for a week, to sincerely ask for your help on what would be the right direction to convert it offline.
Do I really need to refactor my application to be Windows compatible, or is there a way where I can use my existing implementation without using Docker? **
*Edit: Specified that my app has a backend that requires specific dependencies that users need to access. Credits to #super.
I have an iOS application, which I can build and deploy with my MacBook.
Now I would like to automate this for CI/CD.
Is it possible?
I found following ways:
MacOS under Oracle Virtual box on non Mac machine. Works but in gray legal zone.
AWS mac.metal instance. Too expensive, since they require to rent instance for at least 24 hours.
CircleCI. Problems with 2-factor authorization.
Is there any common, clean and accepted way to do this?
Github Actions (documentation) supports building on macOS. That's probably going to be the easiest method for many people, because it's all built into Github, which is what almost everyone is using.
I'm using Azure DevOps, and have a Linux build pipeline (ubuntu-16.04) setup that builds the code, starts containers with Docker Compose, then runs integration tests using the containers. This all works great.
Now I want to setup a Windows build pipline that does the same thing. However, with both the windows-2019 and win-1803 images, when I do docker stack up, I get this error message:
image operating system "linux" cannot be used on this platform
So, I guess Docker is installed in Windows mode, and thought to switch it to Linux containers using:
DockerCli.exe" -SwitchLinuxEngine
or
"%ProgramFiles%\Docker\Docker\DockerCli.exe" -SwitchLinuxEngine
However, the DockerCli.exe executable doesn't seem to be installed at all.
The only 2 things I can think of are:
Setup a self-hosted build agent
Somehow start the required containers somewhere else
But both of these will be a lot of work to setup, which I really don't need, neither do I want the running costs, or the job of maintaining it.
Are there any workarounds to run Linux containers on hosted Windows build agents?
Run Linux containers in an Azure DevOps Windows hosted build agent
Firstly, see the images listed which installed on Windows hosted agent: Docker images in Windows hosted agent. Docker EE on Server does not support Linux containers at all. So, it is impossible to build Linux docker image on Hosted Win-1803 agent. It can only build Windows docker image.
Until now, the only two workarounds is using self-hosted agent which based on Windows machine, or run a build which has two separate agent jobs(Pass the build artifacts back and forth between one agent job which run on Hosted Linux agent and the other is running on Hosted Windows agent) .
But since these two workarounds are all not convenient for you, there will not any other work around can achieve what you want.
In addition, there has a such suggestion feature raised on our official forum: Support for Docker with Linux Containers on Windows (LCOW) on hosted agent pool . You could vote and comment there, our Product Group team will review these suggestions regularly and consider taking it as Developer Roadmap. If this feature can be true, I think it will be very convenient to build Linux Container and without considering about which agent can only support.
What is the difference between Docker os image with web server installed with a web server and Docker webserver image ?
For eg Docker image of Ubuntu-16.04 running as container with NginX installed and other container running Nginx as Nginx Docker image?
Whose Performance will be better and stable ?
Usually a container with nginx runs in alpine os . a very lightweight os. While in the other hand you have ubuntu os and nginx.
So , the difference? ... the OS.
If you have good Docker/Unix/shell-scripting skills, a continuous-integration (CI) system, and the willingness to do ongoing maintenance, you might prefer building your own images. You will be in control of the exact version of the software used, and any build options or extensions required, and you will control when it gets security patches. But, this is a harder path to get started with, and if you don't periodically update your custom images they'll never get any sort of bug fixes or security patches at all.
If you're new to this space, you might prefer standard Docker Hub images. They're pre-packaged, usually have "enough" customization options, and are generally fairly good quality. But, if you need some extra customization, you might wind up needing to build a custom image anyways. I've also run into a situation where I've pinned an image to a specific upstream version image:1.2.3, and noticed several months later that image:1.2.7 is out, and the six-month-old Docker Hub image hasn't gotten a critical security fix because it's not getting built any more.
If none of this especially concerns you (and if you don't have a DevOps team at your disposal), I'd suggest just using the prebuilt nginx image and focusing on building and deploying your actual application.
So far I have been using Travis and was quite happy about it (although it only provides Linux environments) however I am considering to give TeamCity a try and work with YouTrack as well. My current scenario is the following:
I have a project that consists of multiple applications and libraries that should are platform independant targeting Windows, macOS and Linux and bundled together for each of those platforms. Everytime I finish a feature branch and merge it to the development branch I need to manually pull the new changes, compile and run test suites on Windows and macOS separately.
I'd like to be able to push changes to the development branch and have the CI tool handle all platforms simultaneously. Therefore I noticed that I can setup an online TeamCity server (for example on DigitalOcean) and have a Linux build agent running besides it while having a Windows build agent on my local desktop computer and a macOS build agent on my (local) Macbook in order to let those machines use the local toolchains native to their systems.
First of all I'd like to know whether this is a feasible setup in general. I considered using Docker images of build agents until I noticed that a Windows build agent only runs on Windows servers and I'd have to configure the container myself with installing msbuild and such. Therefore I considered just using my local machines with their already setup toolchains as build slaves in this case.
Finally, I'd like to know whether TeamCity provides build queues or something similiar. What I am referring to is the following situation: I am on the train and finishing something on my Macbook and merge it into the branch. However my desktop with the Windows build agent is offline at the moment. Does it work through the queued commits/builds once I boot it up again?
Everything in your scenario seems feasible to accomplish with teamcity. You could have a set up with 3 builds all with the same trigger. Each build would have the build steps for a specific operating system. If you had all machines and agents running they would likely all be triggered at the same time and perform their builds in parallel.
I"m not sure what you are trying to say in paragraph 4 about the "windows build agents only runs on windows servers". Windows build agents can run on desktop versions on windows such as windows 7 or windows 10.
Yes, teamcity has a queue. If an agent is offline the build will be held in the queue until the agent is back online or the build is cancelled.