Skip to content

Commit f97663c

Browse files
author
Peter Kelly
authored
Add supporting documentation for the project (#10)
* 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. * Add clearer upgrade instructions * Changed revision back to 1 for this 0.2 release
1 parent 5836c65 commit f97663c

File tree

10 files changed

+261
-8
lines changed

10 files changed

+261
-8
lines changed

Diff for: .github/ISSUE_TEMPLATE/bug_report.md

+31
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.

Diff for: .github/ISSUE_TEMPLATE/feature_request.md

+17
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.

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+12
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

Diff for: CHANGELOG.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
The upgrade process requires changing both NGINX Plus configuration and nginx-asg-sync configuration. Below are the recommended steps to follow:
12+
13+
1. Upgrade NGINX Plus to R14 or R15
14+
2. Enable the new API in the NGINX Plus configuration while keeping the upstream_conf and the status API enabled. See an example of configuring the new API in the configuration section, but make sure to keep the upstream_conf and the status API.
15+
3. Reload NGINX Plus to apply the updated configuration
16+
4. Modify the /etc/nginx/aws.yaml file:
17+
* Remove the `upstream_conf_endpoint` and `status_endpoint` fields.
18+
* Add the `api_endpoint` field. See an example in the configuration section of the README.md
19+
5. Download the Release 0.2 nginx-asg-sync package for your OS and upgrade the package using the OS tools (dpkg or rpm).
20+
6. Check the logs of nginx-asg-sync to make sure that it is working properly after the upgrade.
21+
7. Finally remove the upstream_conf and the status API from NGINX Plus configuration.
22+
8. Reload NGINX Plus to apply the updated configuration
23+
24+
Note: the supported versions of NGINX Plus are R14 and higher.
25+
26+
## 0.1-2 (August 30, 2017)
27+
28+
IMPROVEMENTS:
29+
30+
* Make sure nginx-asg-sync works with NGINX Plus R13
31+
32+
33+
## 0.1-1 (March 6, 2017)
34+
35+
Initial release

Diff for: CONTRIBUTING.md

+145
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:[email protected]]. 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

Diff for: build/package/debian/aws.yaml.example

+1-2
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

Diff for: build/package/debian/changelog

+10-1
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 <[email protected]> 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 <[email protected]> Wed, 30 Aug 2017 21:03:28 +0000
15+
-- Michael Pleshakov <[email protected]> Wed, 30 Aug 2017 21:03:28 +0000
716

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

Diff for: build/package/rpm/SOURCES/aws.yaml.example

+1-2
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

Diff for: build/package/rpm/SPECS/nginx-asg-sync.spec

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

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

112112
%changelog
113+
* Fri Jul 27 2018 Peter Kelly <[email protected]>
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 <[email protected]>
114120
- 0.1-2
115121
- Make sure nginx-asg-sync works with NGINX Plus R13

Diff for: cmd/sync/main.go

+1-1
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)