To develop and compile Optimizely Agent from source:
- Install Golang version 1.13+ .
- Clone the Optimizely Agent repo.
- From the repo directory, open a terminal and start Optimizely Agent:
This starts the Optimizely Agent with the default configuration in the foreground.
You can use a helper script to install prerequisites (Golang, Git) and compile agent in a Windows environment. Take these steps:
- Clone the Optimizely Agent repo
- From the repo directory, open a Powershell terminal and run
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser .\scripts\build.ps1 .\bin\optimizely.exe
If you have Docker installed, you can start Optimizely Agent as a container. Take these steps:
- Pull the Docker image:
docker pull optimizely/agent
By default this will pull the "latest" tag. You can also specify a specific version of Agent by providing the version as a tag to the docker command:
docker pull optimizely/agent:X.Y.Z
- Run the docker container with:
docker run -p 8080:8080 --env OPTIMIZELY_LOG_PRETTY=true --env OPTIMIZELY_SERVER_HOST=0.0.0.0 --env OPTIMIZELY_SERVER_ALLOWEDHOSTS=127.0.0.1 optimizely/agent
This will start Agent in the foreground and expose the container API port 8080 to the host.
- (Optional) You can alter the configuration by passing in environment variables to the preceding command, without having to create a config.yaml file. See configure optimizely agent for more options.
When a new version is released, 2 images are pushed to dockerhub. They are distinguished by their tags:
- :latest (same as :X.Y.Z)
- :alpine (same as :X.Y.Z-alpine)
The difference between latest and alpine is that latest is built
FROM scratch while alpine is
Updated 11 months ago