Skip to content

Commit

Permalink
Merge pull request #1 from syberalexis/storj
Browse files Browse the repository at this point in the history
Module implementation
  • Loading branch information
syberalexis committed Apr 10, 2020
2 parents d95319d + 0c72569 commit 3bef65d
Show file tree
Hide file tree
Showing 21 changed files with 1,262 additions and 53 deletions.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Bug report
about: Create a report to help us improve
title: '[BUG] My bug...'
labels: 'bug'
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Environment**
- Puppet code
- Hieradata
- Facts

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: '[FEATURE] My new proposal...'
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
.project
.envrc
/inventory.yaml
.vendor
2 changes: 2 additions & 0 deletions .pdkignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@
/.yardopts
/spec/
/.vscode/
/.github/
/.vendor/
68 changes: 36 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,48 @@
---
dist: xenial
dist: bionic
language: ruby
cache: bundler
before_install:
- bundle -v
- rm -f Gemfile.lock
- gem update --system $RUBYGEMS_VERSION
- gem --version
- bundle -v
- bundle -v
- rm -f Gemfile.lock
- gem update --system $RUBYGEMS_VERSION
- gem --version
- bundle -v
script:
- 'bundle exec rake $CHECK'
bundler_args: --without system_tests
- bundle exec rake $CHECK
rvm:
- 2.5.3
- 2.5.3
stages:
- static
- spec
- acceptance
matrix:
- static
- spec
- name: deploy
if: tag =~ ^v\d
jobs:
fast_finish: true
include:
-
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
stage: static
-
env: PUPPET_GEM_VERSION="~> 6.0" CHECK="parallel_spec spec/classes spec/defines"
rvm: 2.5.3
stage: spec
deploy:
skip_cleanup: true
provider: puppetforge
user: "maeq"
password:
secure: ${{ secrets.FORGE_API_KEY }}
on:
branch: master
tags: /^v\d/
- stage: static
bundler_args: "--without system_tests"
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"

- stage: spec
bundler_args: "--without system_tests"
env: PUPPET_GEM_VERSION="~> 6.0" CHECK="parallel_spec spec/classes spec/defines"

- stage: deploy
bundler_args: "--without system_tests"
env: CHECK=build DEPLOY_TO_FORGE=yes

branches:
only:
- master
- /^v\d/
- master
- "/^v\\d/"
notifications:
email: false
deploy:
provider: puppetforge
user: maeq
password:
secure: "pckRWQgpry7EholF461nYXQEjhD4hMoXrPTDHhoNJrblqFZVd2hsBFHFufFyqV3kzfnSPYdJDHmpVO8xbuQhH7Jxl1nGBZI+dIJzx2lO2HUasDzjyGMHmxXl47x+4k4MVLoOtYQel4PGBBh7SpOKqj9XNSvQXj1ELx2ze92XkPEw5q1zRI8VuCi/SmWh83GIjmsypk8K2n3ek48KSRL5Sd9EhlMxVGK/4L6oZ/AmuyQ+g1jzV/nwX7F6OS7zSfHZxuNHYIDw8l42n9hZxp3isKoWixASyUFhGA8s2FfUlPSW3t8opQa5Pqa3LrnzK9L9WOBKnu2kPUTmxoP6aGDldbbVfwt7DmbCm52fBI7+2E4dU/28iIIOL/nKipwh81Zg9/khManZrr9w4/26n1zoPG6I2Snq29z4jYEYcKi4UBpo8MpnFcRQL8OHh4NSOA93kIeydzo7+tCsLjhupM+0xIfQLEixVNzcfNvwmv/D48bXDDblDbPdRhf7NkTNf6KidtA6lXd+9GpgrJMA0CRFsCngY5TfEWIl5rFAomk+TCZYj2k/tVexBQrpsN5LpCi0csubmAhFS2NQZjUbuM1go6XzLeFhodx2zsle8KzlLpoHE+EkYtI3VvG91J5phQyPa3ccsRoqiR4D8f3nQ/hD/zIMTI/dtLF3C8musKyhB08="
on:
tags: true
all_branches: true
condition: "$DEPLOY_TO_FORGE = yes"
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@

All notable changes to this project will be documented in this file.

## Release 0.1.0

**Features**

- Installation of Storj binaries
- Configuration of Storj identity authorization requesting
- Installation of storagenode Service
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Contributing

## Report an issue or a feature proposal
To submit an issue or a feature, please fill as possible the template.

## Contribute
To contribute to a Puppet module project, please read the [Contributing to Puppet modules guide](https://puppet.com/docs/puppet/latest/contributing.html).

## Tests
This project contains tests for [rspec-puppet](http://rspec-puppet.com/).

Quickstart to run all linter and unit tests:
```bash
bundle install --path .vendor/
bundle exec rake test
```
Or
```bash
pdk validate
pdk test unit
```

## Pull Request
It is very much appreciated to check your Puppet manifest with [puppet-lint](http://puppet-lint.com/) to follow the recommended Puppet style guidelines from the [Puppet Labs style guide](https://puppet.com/docs/puppet/latest/style_guide.html).
Please run [tests](#tests) before, to don't break the CI.
29 changes: 29 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,35 @@ group :development do
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
end

group :system_tests do
gem 'winrm', :require => false
if beaker_version = ENV['BEAKER_VERSION']
gem 'beaker', *location_for(beaker_version)
else
gem 'beaker', '>= 4.2.0', :require => false
end
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
gem 'beaker-rspec', *location_for(beaker_rspec_version)
else
gem 'beaker-rspec', :require => false
end
gem 'serverspec', :require => false
gem 'beaker-hostgenerator', '>= 1.1.22', :require => false
gem 'beaker-docker', :require => false
gem 'beaker-puppet', :require => false
gem 'beaker-vagrant', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'beaker-module_install_helper', :require => false
gem 'rbnacl', '>= 4', :require => false
gem 'rbnacl-libsodium', :require => false
gem 'bcrypt_pbkdf', :require => false
gem 'ed25519', :require => false
end

group :build do
gem 'pdk', '1.16.0'
end

puppet_version = ENV['PUPPET_GEM_VERSION']
facter_version = ENV['FACTER_GEM_VERSION']
hiera_version = ENV['HIERA_GEM_VERSION']
Expand Down
50 changes: 47 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![Build Status AppVeyor](https://img.shields.io/appveyor/ci/syberalexis/puppet-storj/master?label=build%20appveyor)](https://ci.appveyor.com/project/syberalexis/puppet-storj)
[![Puppet Forge](https://img.shields.io/puppetforge/v/maeq/storj.svg)](https://forge.puppetlabs.com/maeq/storj)
[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/maeq/storj.svg)](https://forge.puppetlabs.com/maeq/storj)
[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/maeq/storj.svg)](https://forge.puppetlabs.com/maeq/storj)
[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/maeq/storj.svg)](https://forge.puppetlabs.com/maeq/storj)
[![Apache-2 License](https://img.shields.io/github/license/syberalexis/puppet-storj.svg)](LICENSE)

Expand All @@ -25,12 +24,27 @@ This module automates the install of [Storj](https://storj.io/) and it's compone

For more information see [REFERENCE.md](REFERENCE.md).

### Before running

#### Request your authorization token

Before all things, you need to request your authorization token to each node [HERE](https://storj.io/sign-up-node-operator/).

#### Create identity key
You need to create a identity key. This operation take many time and this module don't manage it.
Refer to the documentation https://documentation.storj.io/dependencies/identity#create-an-identity

### Install Storj

#### Puppet
```puppet
class { 'storj':
authorization_token => '[YOUR AUTHORIZATION TOKEN]',
wallet => '[YOUR WALLET ADDRESS]',
mail => '[YOUR EMAIL]',
host => '[THE NODE HOSTNAME OR ALTNAME]',
storage => '[THE DEDICATED ANOUT OF STORAGE]',
storage_path => '[THE DEDICATED STORAGE LOCATION]',
}
```

Expand All @@ -39,12 +53,42 @@ class { 'storj':
include storj
```
```yaml
storj::authorization_token: '[YOUR AUTHORIZATION TOKEN]'
storj::wallet: '[YOUR WALLET ADDRESS]'
storj::mail: '[YOUR EMAIL]'
storj::host: '[THE NODE HOSTNAME OR ALTNAME]'
storj::storage: '[THE DEDICATED ANOUT OF STORAGE]'
storj::storage_path: '[THE DEDICATED STORAGE LOCATION]'
```
### Examples
#### Default installation
```yaml
storj::authorization_token: 'test.test@test.test:T3sT'
storj::wallet: '0x00000000000000000000'
storj::mail: 'test.test@test.test'
storj::host: 'my_storj_storagenode'
storj::storage: '1TB'
storj::storage_path: '/dev/sdb1'
```
## Limitations
#### Personal docker installation
```yaml
storj::authorization_token: 'test.test@test.test:T3sT'
storj::wallet: '0x00000000000000000000'
storj::mail: 'test.test@test.test'
storj::host: 'my_storj_storagenode'
storj::storage: '1TB'
storj::storage_path: '/dev/sdb1'
storj::manage_docker: false
```
## Limitations
This module don't create the identity key. Please see [documentation](https://documentation.storj.io/dependencies/identity#create-an-identity)
## Development
Expand Down
Loading

0 comments on commit 3bef65d

Please sign in to comment.