Skip to content

Commit

Permalink
Release 1.0.0 (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome authored Aug 28, 2024
1 parent aa0358d commit 5039af0
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 56 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ jobs:
mkdir -p $HOME/.cache/snapcraft/stage-packages
if: github.ref_type == 'tag'

- name: Build binaries
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
version: latest
version: v2.2.0 # renovate: datasource=github-tags depName=goreleaser/goreleaser
args: ${{ github.ref_type == 'tag' && 'release' || 'build --snapshot' }} --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

Starting with version 1.0.0 an automatically generated list of changes can be found on the [GitHub Releases page](https://github.com/nginxinc/nginx-asg-sync/releases).

## 0.5.0 (February 24, 2021)

IMPROVEMENTS:
Expand Down Expand Up @@ -56,8 +58,8 @@ recommended steps to follow:
status API.
3. Reload NGINX Plus to apply the updated configuration
4. Modify the /etc/nginx/aws.yaml file:
- Remove the `upstream_conf_endpoint` and `status_endpoint` fields.
- Add the `api_endpoint` field. See an example in the configuration section of the README.md
- Remove the `upstream_conf_endpoint` and `status_endpoint` fields.
- Add the `api_endpoint` field. See an example in the configuration section of the README.md
5. Download the Release 0.2 nginx-asg-sync package for your OS and upgrade the package using the OS tools (dpkg or rpm).
6. Check the logs of nginx-asg-sync to make sure that it is working properly after the upgrade.
7. Finally remove the upstream_conf and the status API from NGINX Plus configuration.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ lint:

nginx-asg-sync:
@go version || (code=$$?; printf "\033[0;31mError\033[0m: unable to build locally, try using the parameter TARGET=container or TARGET=download\n"; exit $$code)
CGO_ENABLED=0 GOFLAGS="-gcflags=-trimpath=$(shell go env GOPATH) -asmflags=-trimpath=$(shell go env GOPATH)" GOOS=linux go build -trimpath -ldflags "-s -w" -o nginx-asg-sync github.com/nginxinc/nginx-asg-sync/cmd/sync
CGO_ENABLED=0 GOFLAGS="-gcflags=-trimpath=$(shell go env GOPATH) -asmflags=-trimpath=$(shell go env GOPATH)" GOOS=linux go build -trimpath -ldflags "-s -w -X main.version=devel" -o nginx-asg-sync github.com/nginxinc/nginx-asg-sync/cmd/sync

.PHONY: build-goreleaser
build-goreleaser:
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ Support for other operating systems or architectures can be added.
### Manual Installation

1. Get a software package for your OS:
- For a stable release, download a package from the [releases page](https://github.com/nginxinc/nginx-asg-sync/releases).
- For the latest source code from the main branch, build a software package by following [these
instructions](#building-a-software-package).
- For a stable release, download a package from the [releases page](https://github.com/nginxinc/nginx-asg-sync/releases).
- For the latest source code from the main branch, build a software package by following [these
instructions](#building-a-software-package).
2. Install the package:
- For CentOS/RHEL based OSs, run: `sudo rpm -i <package-name>.rpm`
- For Debian based OSs, run: `sudo dpkg -i <package-name>.deb`
- For CentOS/RHEL based OSs, run: `sudo rpm -i <package-name>.rpm`
- For Debian based OSs, run: `sudo dpkg -i <package-name>.deb`

### Snap Installation

Expand Down Expand Up @@ -198,12 +198,12 @@ parameter ensures NGINX Plus won't consider a newly added instance healthy until
When using AWS it's possible to filter out the instances that are not in a `InService` state of the
[Lifecycle](https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html) with the parameter
`in_service` set to `true`. This will ensure that the IP won't be added until the instance is ready to accept requests.
This also works when an instance is being terminated: the asg-sync will remove the IP of an instance that went from the
This also works when an instance is being terminated: the asg-sync will remove the IP of an instance that went from the
`InService` state to one of the terminating states.

> **Note**
>
> Because the asg-sync works on a polling-based model, there will be a delay between the instance going to a
> Because the asg-sync works on a polling-based model, there will be a delay between the instance going to a
> terminating state and the asg-sync removing its IP from NGINX Plus. To guarantee that NGINX Plus doesn't send any
> requests to a terminated instance, make sure the instance goes to the `Terminating:Wait` state for a period greater
> than the interval `sync_interval`.
Expand Down
20 changes: 10 additions & 10 deletions build/config.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
# api_endpoint: http://127.0.0.1:8080/api
# sync_interval: 5s
# upstreams:
# - name: backend1
# autoscaling_group: backend-group-1
# - name: backend-one
# autoscaling_group: backend-one-group
# port: 80
# kind: http
# - name: backend2
# autoscaling_group: backend-group-2
# - name: backend-two
# autoscaling_group: backend-two-group
# port: 80
# kind: http
# - name: tcp-backend
# autoscaling_group: backend-group-3
# autoscaling_group: backend-three-group
# port: 80
# kind: stream

Expand All @@ -26,15 +26,15 @@
# api_endpoint: http://127.0.0.1:8080/api
# sync_interval: 5s
# upstreams:
# - name: backend1
# virtual_machine_scale_set: backend-group-1
# - name: backend-one
# virtual_machine_scale_set: backend-one-group
# port: 80
# kind: http
# - name: backend2
# virtual_machine_scale_set: backend-group-2
# - name: backend-two
# virtual_machine_scale_set: backend-two-group
# port: 80
# kind: http
# - name: tcp-backend
# virtual_machine_scale_set: backend-group-3
# virtual_machine_scale_set: backend-three-group
# port: 80
# kind: stream
2 changes: 1 addition & 1 deletion cmd/sync/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
var (
configFile = flag.String("config_path", "/etc/nginx/config.yaml", "Path to the config file")
logFile = flag.String("log_path", "", "Path to the log file. If the file doesn't exist, it will be created")
version = "0.5.0"
version string
)

const connTimeoutInSecs = 10
Expand Down
34 changes: 17 additions & 17 deletions examples/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ sync_interval: 5s
cloud_provider: AWS
profile: default
upstreams:
- name: backend-one
autoscaling_group: backend-one-group
port: 80
kind: http
max_conns: 0
max_fails: 1
fail_timeout: 10s
slow_start: 0s
- name: backend-two
autoscaling_group: backend-two-group
port: 80
kind: http
max_conns: 0
max_fails: 1
fail_timeout: 10s
slow_start: 0s
in_service: true
- name: backend-one
autoscaling_group: backend-one-group
port: 80
kind: http
max_conns: 0
max_fails: 1
fail_timeout: 10s
slow_start: 0s
- name: backend-two
autoscaling_group: backend-two-group
port: 80
kind: http
max_conns: 0
max_fails: 1
fail_timeout: 10s
slow_start: 0s
in_service: true
```
- The `api_endpoint` key defines the NGINX Plus API endpoint.
Expand Down
32 changes: 16 additions & 16 deletions examples/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ cloud_provider: Azure
subscription_id: my_subscription_id
resource_group_name: my_resource_group
upstreams:
- name: backend-one
virtual_machine_scale_set: backend-one-group
port: 80
kind: http
max_conns: 0
max_fails: 1
fail_timeout: 10s
slow_start: 0s
- name: backend-two
virtual_machine_scale_set: backend-two-group
port: 80
kind: http
max_conns: 0
max_fails: 1
fail_timeout: 10s
slow_start: 0s
- name: backend-one
virtual_machine_scale_set: backend-one-group
port: 80
kind: http
max_conns: 0
max_fails: 1
fail_timeout: 10s
slow_start: 0s
- name: backend-two
virtual_machine_scale_set: backend-two-group
port: 80
kind: http
max_conns: 0
max_fails: 1
fail_timeout: 10s
slow_start: 0s
```
- The `api_endpoint` key defines the NGINX Plus API endpoint.
Expand Down

0 comments on commit 5039af0

Please sign in to comment.