Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
= Migrate from launch agent to machine runner 3 on Linux
:page-platform: Cloud, Server v4.4+
:page-description: Steps to migrate from using launch agent to machine runner 3
:experimental:
:machine:
:linux:

This page describes how to migrate an existing launch agent installation to machine runner 3. Machine runner 3 includes improved network resiliency, and a simpler installation management strategy, utilizing operating system packages.

Migrating from launch agent to machine runner 3 is a straightforward process. The prerequisites remain the same. First, uninstall and remove launch agent, then, install the machine runner 3 agent. The configuration file is 1:1 compatible between the agents so no modifications are needed during the migration

[#uninstall-launch-agent]
== 1. Uninstall launch agent

The first step is to uninstall launch agent. The exact process depends on the platform, as described in the following sections.

. If the agent has been installed as a `systemd` service, run the following commands to stop and uninstall the service unit, and delete the service file (the new agent will install a new service unit):
+
```shell
sudo systemctl stop circleci.service
sudo systemctl disable circleci.service

sudo rm /usr/lib/systemd/system/circleci.service
```

. The launch agent binary can now be removed from the machine. The default install location is `/opt/circleci/circleci-launch-agent`, but this may differ on your machine if the agent was installed somewhere else. The entire `/opt/circleci` subdirectory can be removed at this point.

. Finally, move the agent configuration file. The default location for this is `/etc/opt/circleci/launch-agent-config.yaml`. Move the file to `/etc/circleci-runner/circleci-runner-config.yaml` using the following command:
+
```shell
mv /etc/opt/circleci/launch-agent-config.yaml /etc/circleci-runner/circleci-runner-config.yaml
```
+
Alternatively, you can let the machine agent install process create a config file template and copy the xref:runner-installation-linux.adoc#create-the-circleci-self-hosted-runner-configuration[existing config] into the newly created file.

[#uninstalling-launch-agent-linux-se]
=== RHEL/Rocky Linux

In addition to the steps listed above, the SELinux policy should be uninstalled using the following command:

```shell
sudo semodule -r circleci_launch_agent
```

[#install-machine-agent]
== 2. Install the machine agent
. Follow the instructions provided in xref:install-machine-runner-3-on-linux.adoc[Install machine runner 3 on Linux] to install machine runner 3 using the provided packages.

. The packages create template configuration files at `/etc/circleci-runner/circleci-runner-config.yaml`. This configuration is 1:1 compatible with the launch agent configuration, apart from the auto-update feature. Since auto-update has been removed from the new agent, you should use the appropriate package management update tools to get new versions of the package when they are released. When using the `apt` package to update the agent package, you will need to clear the configuration file modified prompt. This can be avoided using the `--force-confold` flag or by removing the modified configuration file before upgrading.
+
Once the configuration file has been populated, the following command will restart the agent so it can begin claiming:
+
```shell
sudo systemctl enable circleci-runner
sudo systemctl start circleci-runner
```

[#additional-resources]
== Additional resources

- xref:machine-runner-3-configuration-reference.adoc[Machine runner 3 configuration reference]
- xref:machine-runner-3-manual-installation.adoc[Machine runner 3 manual installation reference]
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
= Migrate from launch agent to machine runner 3 on macOS
:page-platform: Cloud, Server v4.4+
:page-description: Steps to migrate from using launch agent to the machine runner 3 preview
:machine:
:experimental:
:macos:

This page describes how to migrate an existing launch agent installation to machine runner 3. Machine runner 3 includes improved network resiliency, and a simpler installation management strategy, utilizing operating system packages.

Migrating from launch agent to machine runner 3 is a straightforward process. The prerequisites remain the same. First, uninstall and remove launch agent, then, install the machine runner 3 agent. The configuration file is 1:1 compatible between the agents so no modifications are needed during the migration

[#uninstall-launch-agent]
== 1. Uninstall launch agent service
The first step is to uninstall launch-agent. If the agent has been installed as a `launchctl` service run the following commands to stop as well as uninstall the service, and delete the service file.

[,shell]
----
sudo launchctl unload '/Library/LaunchDaemons/com.circleci.runner.plist'
sudo rm -f '/Library/LaunchDaemons/com.circleci.runner.plist'
sudo rm -rf '/opt/circleci'
----

[#install-macos-machine-runner]
== 2. Install the macOS Machine Runner 3.0
Follow the instructions in xref:install-machine-runner-3-on-macos.adoc#install-circleci-runner[Install machine runner 3 on macOS] to install machine runner 3 using a Homebrew package.

[#additional-resources]
== Additional resources

- xref:machine-runner-3-configuration-reference.adoc[Machine runner 3 configuration reference]
- xref:machine-runner-3-manual-installation.adoc[Machine runner 3 manual installation reference]
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
= Migrate from launch agent to machine runner 3 on Windows
:page-platform: Cloud, Server v4.4+
:page-description: Steps to migrate from using launch agent to the machine runner 3 preview on Windows
:machine:
:Windows:

This page describes how to migrate an existing launch agent installation to machine runner 3. Machine runner 3 on Windows.

Migrating from launch agent to machine runner 3 is a straightforward process. The prerequisites remain the same. First, uninstall and remove launch agent, then, install the machine runner 3 agent. The configuration file is 1:1 compatible between the agents so no modifications are needed during the migration

[#uninstall-launch-agent]
== 1. Uninstall launch agent
The first step is to uninstall launch agent.

. Download the https://github.com/CircleCI-Public/runner-installation-files/tree/main/windows-install[`Uninstall-CircleCIRunner.ps1` script] from GitHub to an accessible location.
. Open PowerShell as an administrator and navigate to the directory where you placed the script file.

. Run the following in your PowerShell:
+
[,powershell]
----
./Uninstall-CircleCIRunner.ps1
----

[#copy-current-runner-configuration]
== 2. Copy current launch agent configuration

Machine runner 3 is backwards compatible with the launch-agent configuration file. Using PowerShell copy the existing launch-agent config for use with the machine runner 3 installation.

[,powershell]
----
$desktopDir = [Environment]::GetFolderPath("Desktop")
copy "$env:ProgramFiles\CircleCI\runner-agent-config.yaml" "$desktopDir/runner-agent-config.yaml"
----

[#install-machine-runner]
== 3. Install machine runner 3

. Download the https://github.com/CircleCI-Public/runner-installation-files/tree/main/windows-install/circleci-runner[`Install-CircleCIRunner.ps1` script] from GitHub to an accessible location.

. Open PowerShell as an administrator and navigate to the directory where you placed the script file.

. Run the following in your PowerShell:
+
[,powershell]
----
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
./Install-CircleCIRunner.ps1
----
+
The installation will be output into your PowerShell interface.

. As part of the installation, the configuration file for the machine runner (`launch-agent-config.yaml`) will open in Notepad. Fill in the information from the previous configuration file copied in <<copy-current-runner-configuration,step 2>>. The configuration file is located in the installation directory, `C:\Program Files\CircleCI`, by default.

After setup completes, the machine runner starts automatically and begins looking for jobs to process.

include::ROOT:partial$runner/machine-runner-example.adoc[]

[#additional-resources]
== Additional resources

- xref:machine-runner-3-configuration-reference.adoc[Machine runner 3 configuration reference]
- xref:machine-runner-3-manual-installation-on-windows.adoc[Machine runner 3 manual installation reference]
11 changes: 0 additions & 11 deletions docs/guides/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,8 @@
*** xref:execution-runner:install-machine-runner-3-on-docker.adoc[Install machine runner 3 on Docker]
*** xref:execution-runner:machine-runner-3-manual-installation.adoc[Manual install on Linux and macOS]
*** xref:execution-runner:machine-runner-3-manual-installation-on-windows.adoc[Manual install on Windows]
*** xref:execution-runner:migrate-from-launch-agent-to-machine-runner-3-on-linux.adoc[Migrate from launch agent to machine runner 3 on Linux]
*** xref:execution-runner:migrate-from-launch-agent-to-machine-runner-3-on-macos.adoc[Migrate from launch agent to machine runner 3 on macOS]
*** xref:execution-runner:migrate-from-launch-agent-to-machine-runner-3-on-windows.adoc[Migrate from launch agent to machine runner 3 on Windows]
*** xref:execution-runner:machine-runner-3-configuration-reference.adoc[Machine runner 3 configuration reference]

** Machine runner
*** xref:execution-runner:runner-installation-linux.adoc[Linux installation]
*** xref:execution-runner:runner-installation-windows.adoc[Windows installation]
*** xref:execution-runner:runner-installation-mac.adoc[macOS installation]
*** xref:execution-runner:runner-installation-docker.adoc[Docker installation]
*** xref:execution-runner:runner-config-reference.adoc[Machine runner configuration reference]
*** xref:execution-runner:runner-upgrading-on-server.adoc[Upgrade machine runner on server]

** Self-hosted runner reference
*** xref:execution-runner:runner-api.adoc[Self-hosted runner API]
*** xref:execution-runner:runner-faqs.adoc[Self-hosted runner FAQ]
Expand Down
12 changes: 0 additions & 12 deletions docs/guides/modules/execution-runner/pages/runner-concepts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ The container-agent gets installed with container runner. Container-agent polls

The machine runner 3 replaces launch-agent on cloud and server v4.4+. Bringing improvements to network resiliency, installation, and the upgrade process. As with launch-agent, any user who is able to execute a job will be able to gain the same privileges as the task-agent. When machine runner is installed using the provided packages it runs as the `circleci` user.

[#launch-agent]
== Launch-agent

The launch-agent handles the following:

* Manages gathering information required to run a task with machine runner (defined as a parallel run of a job)
* Downloading and launching the task-agent process.

The system has been designed to allow admins to configure the task-agent to run with a lower level of privileges than the launch-agent. Any user who is able to execute a job will be able to gain the same privileges as the task-agent. The launch-agent will run as `root`, but the task-agent will run as `circleci`.

Launch-agent is currently supported on Server v4.x and v3.x. Cloud users and server v4.4+ users should instead refer to <<machine-runner-3,Machine Runner 3>>.

[#self-hosted-runner-concurrency]
== Self-hosted runner concurrency

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ helm upgrade circleci-server oci://cciserver.azurecr.io/circleci-server -n $name

. Deploy and run link:https://github.com/circleci/realitycheck[`reality check`] in your test environment to ensure your installation is fully operational.

. Migrate any existing machine runner instances from the launch agent to the machine runner 3.0 agent, see the xref:guides:execution-runner:migrate-from-launch-agent-to-machine-runner-3-on-linux.adoc#[Migration Guide]. The launch agent is not supported.
. Migrate any existing machine runner instances from the launch agent to the machine runner 3.0 agent. The launch agent is not supported.
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ helm upgrade circleci-server oci://cciserver.azurecr.io/circleci-server -n $name

. Deploy and run link:https://github.com/circleci/realitycheck[`reality check`] in your test environment to ensure your installation is fully operational.

. Migrate any existing machine runner instances from the launch agent to the machine runner 3.0 agent, see the xref:guides:execution-runner:migrate-from-launch-agent-to-machine-runner-3-on-linux.adoc#[Migration Guide]. The launch agent is not supported.
. Migrate any existing machine runner instances from the launch agent to the machine runner 3.0 agent. The launch agent is not supported.