Skip to content

Commit 190fc82

Browse files
committed
feat(affiliate-scripts): initial commit
1 parent f152d81 commit 190fc82

7 files changed

+1788
-2
lines changed

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Contributing
2+
3+
## Introduction
4+
5+
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue, assessing changes, and helping you finalize your pull requests.
6+
7+
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
8+
- Reporting a bug
9+
- Discussing the current state of the code
10+
- Submitting a fix
11+
- Writing code that can be incorporated into the project itself
12+
- Proposing new features
13+
- Improving the documentation
14+
- Writing tutorials or blog posts
15+
16+
When contributing to this repository, please first discuss the change you wish to make via issue,
17+
email, or any other method with the owners of this repository before making a change.
18+
19+
As for everything else in the project, the contributions to this repo are governed by our [Code of Conduct](./CODE_OF_CONDUCT.md).
20+
21+
## Using the issue tracker
22+
23+
Do **NOT** report security vulnerabilities in public issues! See [SECURITY](./SECURITY.md) for further details.
24+
25+
The issue tracker is the preferred channel for bug reports, features requests and submitting pull requests, but please respect the following restrictions:
26+
27+
- Please do not use the issue tracker for personal support requests. Use our [Slack channel/whatever].
28+
29+
- Please do not derail or troll issues. Keep the discussion on topic and respect the opinions of others.
30+
31+
## Your first contribution
32+
33+
Working on your first Pull Request? You can learn how from this free series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
34+
35+
## Pull request process
36+
37+
1. Fork the repo, clone it to your own machine and create your branch from `master`
38+
2. Commit changes to your branch
39+
3. If you've added code that should be tested, add tests
40+
4. If you've changed APIs, or if needed, update the documentation, README, etc.
41+
5. Ensure the test suite passes.
42+
6. Make sure formatting is according to the repo`s style guidelines. Use a linter if needed.
43+
7. Push your work back to your fork
44+
8. Create that pull request
45+
9. Pass the review, reiterate if requests are made by the maintainers
46+
47+
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
48+
49+
## Reviews
50+
51+
Don't forget to review your own code first. Does it make sense? Did you include something unrelated to the overall purpose of the changes? Did you forget to remove any debugging code?
52+
53+
Our code review process is based on the following guidelines:
54+
* [Gitlab's Code Review Guidelines](https://gitlab.com/help/development/code_review.md)
55+
* [thoughtbot's Code Review Guidelines](https://github.com/thoughtbot/guides/tree/master/code-review)
56+
57+
Especially pay attention to the ["Having your code reviewed"](https://gitlab.com/help/development/code_review.md#having-your-code-reviewed) section.
58+
59+
## Copyright and Licensing
60+
61+
All of your contributions will be made under [GPLv3](./LICENSE.md).
62+
63+
## FAQ

README.md

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,70 @@
1-
# ewc-affiliate-node-installation-scripts-
2-
EWC and Volta affiliate validator node installation scripts
1+
# EWC validator node install scripts
2+
3+
EWC and Volta affiliate validator node installation scripts.
4+
5+
**Keep a scratch file ready to collect outputs in - You'll need them**
6+
7+
### Steps
8+
9+
1. Prepare an host according to the [system architecture paper](https://github.com/energywebfoundation/system-design-spec-live) (minimal install with ssh) with one of the following operating systems:
10+
- Debian v9.x
11+
- Ubuntu 18.04 LTS
12+
- CentOS 7
13+
2. Copy the script matching the installed OS from the `affiliate` directory to the host
14+
3. SSH into the new host
15+
4. Make sure the latest system updates are installed by running `apt-get update && apt-get dist-upgrade` (debian/ubuntu) or `yum update` (centos)
16+
5. Make the scrip executable with `chmod +x ./install-*.sh`
17+
6. Run the script (user parameter `--auto` takes default values for node-name and generates a random key which is NOT recommended for production use)
18+
7. Send the installation summary to EWF netops to [[email protected]]([email protected])
19+
20+
## Shared secrets
21+
22+
The following files contain secrets that are used on the validators:
23+
24+
- `.secret` => Contains the password for the ethereum private key
25+
Is accessed by `parity` and `nodecontrol` to send transactions to the chain
26+
- `.env` => Contains the individual second channel password in the `SFTP_PASS` variable. Used by `nodecontrol`
27+
- files in `signer-data/` used by the signer to store the signers encrypted private RSA key for signing telemetry packets.
28+
29+
The following values are considered as public keys in `.env`:
30+
31+
- `VALIDATOR_ADDRESS` => Ethereum address of the validator account. Used by `signer` and `nodecontrol` for identification.
32+
- `TELEMETRY_INGRESS_FINGERPRINT` => SHA256 fingerprint of the Ingress TLS certificate. Ingress presented cert needs to verify against the fingerprint.
33+
- `SFTP_FINGER_PRINT` => Fingerprint of the SSH hostkey when connecting to the second channel.
34+
35+
## Files created by the installation scripts
36+
37+
```
38+
├── docker-stack
39+
│   ├── .env [Configurations used by docker-compose.yml]
40+
│   ├── chain-data [Parity data directory]
41+
│   │   ├── cache
42+
│   │   ├── chains
43+
│   │   │   ├── ver.lock
44+
│   │   │   └── Volta [Blockchainb DB]
45+
│   │   │   .
46+
│   │   ├── keys
47+
│   │   │   └── Volta
48+
│   │   │   ├── address_book.json
49+
│   │   │   └── UTC--2019-04-03T10-11-45Z--4d496ffe-8b48-e2a1-881f-351f03ae5539 [Validator signing key (not on bootnode)]
50+
│   │   ├── network
51+
│   │   │   └── key
52+
│   │   └── signer
53+
│   ├── config
54+
│   │   ├── chainspec.json
55+
│   │   ├── parity-non-signing.toml [Parity configuration when signing disabled by nodecontrol]
56+
│   │   ├── parity-signing.toml [Parity configuration when signing enabled by nodecontrol (default)]
57+
│   │   └── peers
58+
│   ├── curcron
59+
│   ├── docker-compose.yml [Describes the compose stack]
60+
│   └── signer-data
61+
│   ├── signing.key [Encrypted RSA private key of the signer]
62+
│   └── signing.salt [Salt used to decrypt the RSA key on signer start]
63+
└── install-validator.sh [Script to install a validator - can be removed after bootstrap]
64+
```
65+
66+
Other files:
67+
68+
- `/var/run/influxdb.sock` -> Named pipe for telegraf to write telemetry to and signer to read from.
69+
- `/etc/telegraf/telegraf.conf` -> Telegraf collection settings
70+

SECURITY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
If you find security vulnerabilities we kindly ask you not to disclose it in public. Please let the EWF team ([email protected]) know upfront. We will assess the issue as soon as possible on a best-effort basis and will give you an estimate for when we have a fix and release available for an eventual public disclosure.

0 commit comments

Comments
 (0)