Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
sudo ./install.sh


Linux Installation Verification:

1) Check the cronjob:

Code Block
cat /etc/cron.d/breeze-agent

...

Breeze Agent will be automatically installed on the system.

Windows Installation Verification:

1) Open the Task Scheduler (Start → Control Panel → Administrative tools → Task Scheduler).

...

Installing the Breeze Agent on AWS Elastic Beanstalk can be done using .ebextension configuration files. In this example, we will use EB CLI to deploy new configuration.

...

2. Create configuration file in the .ebextension directory that is located in your project directory

Windows-based environment:

Code Block
files:
  "C:\\breeze-agent.exe":
    source: https://elasticbeanstalk-us-east-1-123456789098.s3.amazonaws.com/breeze-agent.exe
    authentication: S3Auth

commands:
  install_breeze:
    command: IF NOT EXIST "C:\Program Files\Breeze\app.bat" (C:\breeze-agent.exe)

Resources:
  AWSEBAutoScalingGroup:
    Metadata:
      AWS::CloudFormation::Authentication:
        S3Auth:
          type: "s3"
          buckets: ["elasticbeanstalk-us-east-1-123456789098"]
          roleName:
            "Fn::GetOptionSetting":
              Namespace: "aws:autoscaling:launchconfiguration"
              OptionName: "IamInstanceProfile"
              DefaultValue: "aws-elasticbeanstalk-ec2-role"

Linux-based environment:

Code Block
files:
  "/tmp/breeze-agent.tgz":
    source: https://elasticbeanstalk-us-east-1-123456789098.s3.amazonaws.com/breeze-agent.tgz
    authentication: S3Auth

commands:
  "install breeze agent":
    test: test ! -d /opt/breeze-agent
    command: tar -xf /tmp/breeze-agent.tgz -C /tmp && /tmp/breeze-agent/install.sh

Resources:
  AWSEBAutoScalingGroup:
    Metadata:
      AWS::CloudFormation::Authentication:
        S3Auth:
          type: "s3"
          buckets: ["elasticbeanstalk-us-east-1-123456789098"]
          roleName:
            "Fn::GetOptionSetting":
              Namespace: "aws:autoscaling:launchconfiguration"
              OptionName: "IamInstanceProfile"
              DefaultValue: "aws-elasticbeanstalk-ec2-role"

Info

This configuration file contains 3 sections: Files, Commands and Resources (AWS). 

The Files section delivers Breeze Agent installer to the instance from S3 bucket.

The Commands section installs the Breeze Agent.

The Resources section creates an authentication role that allows access to the bucket with Breeze Agent installers to the Elastic Beanstalk.

For more configuration options see AWS documentation.

3. Deploy application with new .ebextension config.

...


Once agent installers are ready, add the script to EC2 instance user data to install Breeze Agent. Replace the presigned URL in the script by the one you generated and insert it into the User data section when launching the instance.

Linux:

Code Block
#!/bin/bash

URL='<presigned URL to agent installer in your S3 bucket>'

# download agent installer
curl $URL -o /tmp/breeze-agent.tgz

# unpack agent installer
sudo tar -xf /tmp/breeze-agent.tgz -C /tmp

# install agent
sudo /tmp/breeze-agent/install.sh


Windows:

Code Block
<powershell>
function New-TemporaryDirectory {
  $parent = [System.IO.Path]::GetTempPath()
  [string]$name = [System.Guid]::NewGuid()
  New-Item -ItemType Directory -Path (Join-Path $parent $name)
}

$url = "<presigned URL to agent installer in your S3 bucket>"
$tmp_dir = New-TemporaryDirectory
$agent_sfx = "$tmp_dir\breeze-agent.exe"

# download agent installer
(New-Object System.Net.WebClient).DownloadFile($url, $agent_sfx)

# install agent
Start-Process $agent_sfx -ArgumentList '-gm2' -NoNewWindow -Wait

# clean up
Remove-Item "$tmp_dir" -recurse
</powershell>
Info

Windows must have Powershell preinstalled. This script will work for all Windows Server versions starting 2012 R2 and newer.

SCCM

To install Breeze Agent via SCCM, we recommend using PowerShell script that will download the agent installer to a target machine and install it.

...

Code Block
app.rb >> agent.log 2>&1:
set http_proxy=http://1.2.3.4:3128

...