Skip to content

Commit 004823f

Browse files
author
Peter Kelly
committed
Add supporting documentation for the project
Also updates the example yaml apps for rpm and debian to use the new endpoint Contributing guidelines including a code of conduct, issue and pull request templates, and a changelog.
1 parent 9af1066 commit 004823f

File tree

10 files changed

+252
-7
lines changed

10 files changed

+252
-7
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
**Describe the bug**
8+
A clear and concise description of what the bug is.
9+
10+
**To Reproduce**
11+
12+
Provide the following files as part of the bug report
13+
14+
* NGINX Plus configuration. Run `sudo nginx -T` to gather the full configuration
15+
* nginx-asg-sync configuration from `/etc/nginx/aws.yaml`
16+
17+
Steps to reproduce the behavior, such as:
18+
1. Scale from 2 to 5 EC2 instances
19+
2. New instances not added to nginx.conf
20+
3. See error in `/var/log/nginx-asg-sync/nginx-asg-sync.log`
21+
22+
**Expected behavior**
23+
A clear and concise description of what you expected to happen.
24+
25+
**Your environment**
26+
* Version of nginx-asg-sync
27+
* Version of NGINX Plus
28+
* Version of the OS
29+
30+
**Additional context**
31+
Add any other context about the problem here. Any log files you want to share.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
**Is your feature request related to a problem? Please describe.**
8+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
12+
13+
**Describe alternatives you've considered**
14+
A clear and concise description of any alternative solutions or features you've considered.
15+
16+
**Additional context**
17+
Add any other context about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### Proposed changes
2+
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue here in this description (not in the title of the PR).
3+
4+
### Checklist
5+
Before creating a PR, run through this checklist and mark each as complete.
6+
7+
- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/nginx-asg-sync/blob/master/CONTRIBUTING.md) doc
8+
- [ ] I have added tests that prove my fix is effective or that my feature works
9+
- [ ] I have checked that all unit tests pass after adding my changes
10+
- [ ] I have updated necessary documentation
11+
- [ ] I have rebased my branch onto master
12+
- [ ] I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## 0.2-1 (July 27, 2018)
2+
3+
IMPROVEMENTS:
4+
5+
* Add supporting documentation for the project https://github.com/nginxinc/nginx-asg-sync/pull/10
6+
* Update package layout https://github.com/nginxinc/nginx-asg-sync/pull/9
7+
* Use new NGINX Plus API https://github.com/nginxinc/nginx-asg-sync/pull/7
8+
9+
UPGRADE:
10+
11+
* Remove the previous version of nginx-asg-sync e.g. `dpkg --remove nginx-asg-sync`
12+
* Deploy the new version to your NGINX Plus instance in AWS and install it `dpkg -i nginx-asg-sync_0.2-1-xenial_amd64.deb`
13+
* Update the `/etc/nginx/aws.yaml` to the new format (example in the [configuration section](https://github.com/nginxinc/nginx-asg-sync#nginx-asg-sync-configuration) of the README.md))
14+
* Reload NGINX Plus
15+
16+
Note: the supported versions of NGINX Plus are R14 and higher.
17+
18+
## 0.1-2 (August 30, 2017)
19+
20+
IMPROVEMENTS:
21+
22+
* Make sure nginx-asg-sync works with NGINX Plus R13
23+
24+
25+
## 0.1-1 (March 6, 2017)
26+
27+
Initial release

CONTRIBUTING.md

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Contributing Guidelines
2+
3+
The following is a set of guidelines for contributing to the NGINX AWS Auto-Scale Group Sync tool. We really appreciate that you are considering contributing!
4+
5+
#### Table Of Contents
6+
7+
[Ask a Question](#ask-a-question)
8+
9+
[Getting Started](#getting-started)
10+
11+
[Contributing](#contributing)
12+
13+
[Style Guides](#style-guides)
14+
* [Git Style Guide](#git-style-guide)
15+
* [Go Style Guide](#go-style-guide)
16+
17+
[Code of Conduct](#code-of-conduct)
18+
19+
## Ask a Question
20+
21+
We will have a public forum soon where you can come and ask questions and have a discussion. For now please open an Issue on GitHub with the label `question`.
22+
23+
24+
## Getting Started
25+
26+
Read the installation, configuration and building steps in the [README](https://github.com/nginxinc/nginx-asg-sync/blob/master/README.md).
27+
28+
### Project Structure
29+
30+
* nginx-asg-sync is a service written in Go that works with NGINX Plus.
31+
* The main code is found under `/cmd/sync/`
32+
* Tools for building the service for supported Operating Systems are found under `/build/package`
33+
* The project dependencies reside in the `/vendor`. We use [dep](https://github.com/golang/dep) for managing dependencies.
34+
* There is a Makefile at the project root used in the build steps.
35+
36+
## Contributing
37+
38+
### Report a Bug
39+
40+
To report a bug, open an issue on GitHub with the label `bug` using the available bug report issue template. Please ensure the issue has not already been reported.
41+
42+
### Suggest an Enhancement
43+
44+
To suggest an enhancement, please create an issue on GitHub with the label `enhancement` using the available feature issue template.
45+
46+
### Open a Pull Request
47+
48+
* Fork the repo, create a branch, submit a PR when your changes are tested and ready for review
49+
* Fill in [our pull request template](https://github.com/nginxinc/nginx-asg-sync/blob/master/.github/PULL_REQUEST_TEMPLATE.md)
50+
51+
Note: if you’d like to implement a new feature, please consider creating a feature request issue first to start a discussion about the feature.
52+
53+
## Style Guides
54+
55+
### Git Style Guide
56+
57+
* Keep a clean, concise and meaningful git commit history on your branch, rebasing locally and squashing before submitting a PR
58+
* Follow the guidelines of writing a good commit message as described here https://chris.beams.io/posts/git-commit/ and summarised in the next few points
59+
* In the subject line, use the present tense ("Add feature" not "Added feature")
60+
* In the subject line, use the imperative mood ("Move cursor to..." not "Moves cursor to...")
61+
* Limit the subject line to 72 characters or less
62+
* Reference issues and pull requests liberally after the subject line
63+
* Add more detailed description in the body of the git message (`git commit -a` to give you more space and time in your text editor to write a good message instead of `git commit -am`)
64+
65+
### Go Style Guide
66+
67+
* Run `gofmt` over your code to automatically resolve a lot of style issues. Most editors support this running automatically when saving a code file.
68+
* Run `go lint` and `go vet` on your code too to catch any other issues.
69+
* Follow this guide on some good practice and idioms for Go - https://github.com/golang/go/wiki/CodeReviewComments
70+
71+
## Code of Conduct
72+
73+
This project and everyone participating in it is governed by this code.
74+
75+
### Our Pledge
76+
77+
In the interest of fostering an open and welcoming environment, we as
78+
contributors and maintainers pledge to making participation in our project and
79+
our community a harassment-free experience for everyone, regardless of age, body
80+
size, disability, ethnicity, sex characteristics, gender identity and expression,
81+
level of experience, education, socio-economic status, nationality, personal
82+
appearance, race, religion, or sexual identity and orientation.
83+
84+
### Our Standards
85+
86+
Examples of behavior that contributes to creating a positive environment
87+
include:
88+
89+
* Using welcoming and inclusive language
90+
* Being respectful of differing viewpoints and experiences
91+
* Gracefully accepting constructive criticism
92+
* Focusing on what is best for the community
93+
* Showing empathy towards other community members
94+
95+
Examples of unacceptable behavior by participants include:
96+
97+
* The use of sexualized language or imagery and unwelcome sexual attention or
98+
advances
99+
* Trolling, insulting/derogatory comments, and personal or political attacks
100+
* Public or private harassment
101+
* Publishing others' private information, such as a physical or electronic
102+
address, without explicit permission
103+
* Other conduct which could reasonably be considered inappropriate in a
104+
professional setting
105+
106+
### Our Responsibilities
107+
108+
Project maintainers are responsible for clarifying the standards of acceptable
109+
behavior and are expected to take appropriate and fair corrective action in
110+
response to any instances of unacceptable behavior.
111+
112+
Project maintainers have the right and responsibility to remove, edit, or
113+
reject comments, commits, code, wiki edits, issues, and other contributions
114+
that are not aligned to this Code of Conduct, or to ban temporarily or
115+
permanently any contributor for other behaviors that they deem inappropriate,
116+
threatening, offensive, or harmful.
117+
118+
### Scope
119+
120+
This Code of Conduct applies both within project spaces and in public spaces
121+
when an individual is representing the project or its community. Examples of
122+
representing a project or community include using an official project e-mail
123+
address, posting via an official social media account, or acting as an appointed
124+
representative at an online or offline event. Representation of a project may be
125+
further defined and clarified by project maintainers.
126+
127+
### Enforcement
128+
129+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
130+
reported by contacting the project team at [mailto:nginx@nginx.org]. All
131+
complaints will be reviewed and investigated and will result in a response that
132+
is deemed necessary and appropriate to the circumstances. The project team is
133+
obligated to maintain confidentiality with regard to the reporter of an incident.
134+
Further details of specific enforcement policies may be posted separately.
135+
136+
Project maintainers who do not follow or enforce the Code of Conduct in good
137+
faith may face temporary or permanent repercussions as determined by other
138+
members of the project's leadership.
139+
140+
### Attribution
141+
142+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
143+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
144+
145+
[homepage]: https://www.contributor-covenant.org

build/package/debian/aws.yaml.example

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# example configuration
22
region: us-west-2
3-
upstream_conf_endpoint: http://127.0.0.1:8080/upstream_conf
4-
status_endpoint: http://127.0.0.1:8080/status
3+
api_endpoint: http://127.0.0.1:8080/api
54
sync_interval_in_seconds: 5
65
upstreams:
76
- name: backend1

build/package/debian/changelog

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1+
nginx-asg-sync (0.2-1-%%CODENAME%%) unstable; urgency=low
2+
3+
* 0.2-1
4+
* Add supporting guides for contributing and changelog
5+
* Update package layout
6+
* Use new NGINX Plus API
7+
8+
-- Peter Kelly <peter.kelly@nginx.com> Fri, 27 Jul 2018 13:48:00 +0000
9+
110
nginx-asg-sync (0.1-2-%%CODENAME%%) unstable; urgency=low
211

312
* 0.1-2
413
* Make sure nginx-asg-sync works with NGINX Plus R13
514

6-
-- Michael Pleshakov <michael@nginx.com> Wed, 30 Aug 2017 21:03:28 +0000
15+
-- Michael Pleshakov <michael@nginx.com> Wed, 30 Aug 2017 21:03:28 +0000
716

817
nginx-asg-sync (0.1-1-%%CODENAME%%) unstable; urgency=low
918

build/package/rpm/SOURCES/aws.yaml.example

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# example configuration
22
# region: us-west-2
3-
# upstream_conf_endpoint: http://127.0.0.1:8080/upstream_conf
4-
# status_endpoint: http://127.0.0.1:8080/status
3+
# api_endpoint: http://127.0.0.1:8080/api
54
# sync_interval_in_seconds: 5
65
# upstreams:
76
# - name: backend1

build/package/rpm/SPECS/nginx-asg-sync.spec

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
Summary: NGINX Plus integration with AWS Auto Scaling groups
55
Name: nginx-asg-sync
6-
Version: 0.1
6+
Version: 0.2
77
Release: 2%{?dist}
88
Vendor: Nginx Software, Inc.
99
URL: https://github.com/nginxinc/nginx-asg-sync
@@ -110,6 +110,12 @@ if [ $1 -ge 1 ]; then
110110
fi
111111

112112
%changelog
113+
* Fri Jul 27 2018 Peter Kelly <peter.kelly@nginx.com>
114+
- 0.2-1
115+
- Add supporting guides for contributing and changelog
116+
- Update package layout
117+
- Use new NGINX Plus API
118+
113119
* Wed Aug 30 2017 Michael Pleshakov <michael@nginx.com>
114120
- 0.1-2
115121
- Make sure nginx-asg-sync works with NGINX Plus R13

cmd/sync/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020

2121
var configFile = flag.String("config_path", "/etc/nginx/aws.yaml", "Path to the config file")
2222
var logFile = flag.String("log_path", "", "Path to the log file. If the file doesn't exist, it will be created")
23-
var version = "0.1-2"
23+
var version = "0.2-1"
2424

2525
const connTimeoutInSecs = 10
2626

0 commit comments

Comments
 (0)