oneacct-export 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e251289fc61da90a2cd802b46c6a9bb432a267b4
4
- data.tar.gz: 1ee83f262bdf1234ce6e9c90665a8b4716293651
3
+ metadata.gz: 524b14a0f4c51ba085b4f104054dcce81070c6f5
4
+ data.tar.gz: cd2c0e62fb62505fd47dd6eecfc2cae241421353
5
5
  SHA512:
6
- metadata.gz: 4fb58b1c9b0c824a1a1dbc3aecc6e43fcc96de03dc915235a09d6b36d7a44ddf6a7dbaf92724afbfadfeec47229bb78c060233389f5dc298450f098b59d0637f
7
- data.tar.gz: b505e55867d9defd5682e9ea50a2a12ee8f5609ade511122d21bccca7b0abf14e07c92b7a59c2bb19982cd6c627dfdb6ccd4640f6cab65ddb2800001b2582715
6
+ metadata.gz: 1339fba2bb944512220a90c31ad71d132c11bd286b2252de0117e50d1989ecf0f669e37bc7f0f23a3a02be2e4bb5ac421e45fa2fcb5d06aef0058ebb77b8cc34
7
+ data.tar.gz: 51102cc765d368c534240c974493f0323edb44f3450e9c8063bcdd43bcea80ac9ea232583debd1a1f0213008d93dec01698dc88ba254f91883cabcf23a4ab7a6
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # OneacctExport
2
2
  Exporting OpenNebula accounting data.
3
3
 
4
- [![Build Status](https://secure.travis-ci.org/Misenko/oneacct_export.png)](http://travis-ci.org/Misenko/oneacct_export)
5
- [![Dependency Status](https://gemnasium.com/Misenko/oneacct_export.png)](https://gemnasium.com/Misenko/oneacct_export)
4
+ [![Build Status](https://secure.travis-ci.org/EGI-FCTF/oneacct_export.png)](http://travis-ci.org/EGI-FCTF/oneacct_export)
5
+ [![Dependency Status](https://gemnasium.com/EGI-FCTF/oneacct_export.png)](https://gemnasium.com/EGI-FCTF/oneacct_export)
6
6
  [![Gem Version](https://fury-badge.herokuapp.com/rb/oneacct-export.png)](https://badge.fury.io/rb/oneacct-export)
7
- [![Code Climate](https://codeclimate.com/github/Misenko/oneacct_export.png)](https://codeclimate.com/github/Misenko/oneacct_export)
7
+ [![Code Climate](https://codeclimate.com/github/EGI-FCTF/oneacct_export.png)](https://codeclimate.com/github/EGI-FCTF/oneacct_export)
8
8
 
9
9
 
10
10
  ##Requirements
@@ -15,8 +15,11 @@ Exporting OpenNebula accounting data.
15
15
 
16
16
  ##Installation
17
17
  ###From distribution specific packages
18
- Distribution specific packages can be created with [omnibus packaging for OneacctExport](https://github.com/Misenko/omnibus-oneacct-export). When installing via packages you don't have to install neither ruby nor
19
- rubygems. Packages contain embedded ruby and all the necessary gems and libraries witch will not effect your system ruby, gems and libraries.
18
+ Distribution specific packages can be created with
19
+ [omnibus packaging for OneacctExport](https://github.com/EGI-FCTF/omnibus-oneacct-export).
20
+ When installing via packages you don't have to install neither ruby
21
+ nor rubygems. Packages contain embedded ruby and all the necessary gems
22
+ and libraries witch will not effect your system ruby, gems and libraries.
20
23
 
21
24
  Currently supported distributions:
22
25
 
@@ -35,14 +38,15 @@ gem install oneacct-export
35
38
  ```
36
39
 
37
40
  ###From source (dev)
38
- **Installation from source should never be your first choice! Especially, if you are not familiar with RVM, Bundler, Rake and other dev tools for Ruby!**
41
+ **Installation from source should never be your first choice! Especially, if you are not
42
+ familiar with RVM, Bundler, Rake and other dev tools for Ruby!**
39
43
 
40
44
  **However, if you wish to contribute to our project, this is the right way to start.**
41
45
 
42
46
  To build and install the bleeding edge version from master
43
47
 
44
48
  ```bash
45
- git clone git://github.com/Misenko/oneacct_export.git
49
+ git clone git://github.com/EGI-FCTF/oneacct_export.git
46
50
  cd oneacct_export
47
51
  gem install bundler
48
52
  bundle install
@@ -50,50 +54,81 @@ bundle exec rake spec
50
54
  rake install
51
55
  ```
52
56
  ##Configuration
57
+ ###Create a new user account
58
+ Create or use an existing `apel` user account which will be used to run
59
+ the export process. This account must be the same as the user account
60
+ used by the APEL SSM client.
61
+
53
62
  ###Create a configuration file for OneacctExport
54
- Configuration file can be read by OneacctExport from these three locations:
55
-
56
- * ~/.oneacct-export/conf.yml
57
- * /etc/oneacct-export/conf.yml
58
- * <PATH_TO_GEM_DIR>/config/conf.yml
59
-
60
- The example configuration file can be found at the last location <PATH_TO_GEM_DIR>/config/conf.yml. When editing a configuration file you have to follow the division into three environments: production,
61
- development and test. All the configuration options are described in the example configuration file.
62
-
63
+ Configuration file can be read by OneacctExport from these
64
+ three locations:
65
+
66
+ * `~/.oneacct-export/conf.yml`
67
+ * `/etc/oneacct-export/conf.yml`
68
+ * `PATH_TO_GEM_DIR/config/conf.yml`
69
+
70
+ The example configuration file can be found at the last location
71
+ `PATH_TO_GEM_DIR/config/conf.yml`. When editing a configuration
72
+ file you have to follow the division into three environments: `production`,
73
+ `development` and `test`. All the configuration options are described
74
+ in the example configuration file.
75
+
63
76
  ###Create a configuration file for Sidekiq
64
- Sidekiq configuration file can be placed anywhere you want since you will provide path to the configuration later during the Sidekiq start. How the Sidekiq configuration should look like and what options you can use
77
+ Sidekiq configuration file can be placed anywhere you want since you will provide
78
+ path to the configuration later during the Sidekiq start. How the Sidekiq
79
+ configuration should look like and what options you can use
65
80
  can be found on its [wiki page](https://github.com/mperham/sidekiq/wiki/Advanced-Options).
66
-
67
- The important thing is to set the same queue name in both OneacctExport and Sidekiq configuration files. OneacctExport is currently supporting adding jobs to only one queue.
68
-
81
+ An example is provided in `PATH_TO_GEM_DIR/config/sidekiq.yml`.
82
+
83
+ The important thing is to set the same queue name in both
84
+ OneacctExport and Sidekiq configuration files. OneacctExport
85
+ is currently supporting adding jobs to only one queue.
86
+
87
+ ###Create required directories
88
+ ```bash
89
+ mkdir -p /var/run/oneacct-export
90
+ chown apel:apel /var/run/oneacct-export
91
+
92
+ mkdir -p /var/log/oneacct-export
93
+ chown apel:apel /var/log/oneacct-export
94
+ ```
95
+
69
96
  ###Configure RPC connection
70
97
  RPC connection for OpenNebula can be configured in two ways:
71
98
 
72
99
  * Via OneacctExport configuration file, option xml_rpc and its suboptions
73
- * Via Opennebula configuration mechanism:
74
-
75
- System environment variable ONE_AUTH contains path to the file containing string in format username:password to authenticate against OpenNebula. If the variable is empty, default file location is ~/.one/one_auth.
76
-
77
- System environment variable ONE_XMLRPC contains URL of OpenNebula RPC gate. If empty, the same information can be stored in ~/.one/one_endpoint
78
-
100
+ * Via OpenNebula configuration mechanism:
101
+
102
+ System environment variable `ONE_AUTH` contains path to the file containing
103
+ string in format `username:password` to authenticate against OpenNebula.
104
+ If the variable is empty, default file location is `~/.one/one_auth`.
105
+
106
+ System environment variable `ONE_XMLRPC` contains URL of OpenNebula RPC
107
+ gate. If empty, the same information can be stored in `~/.one/one_endpoint`.
108
+
79
109
  ###Set Rails environment variable according to your environment
80
- You have to set system environment variable RAILS_ENV to one of the values production, development or test. OneacctExport is not a Rails application but we chose the Rails variable for easier possible integration in
110
+ You have to set system environment variable `RAILS_ENV` to one of the
111
+ values production, development or test. OneacctExport is not a Rails
112
+ application but we chose the Rails variable for easier possible integration in
81
113
  the future.
82
114
 
83
115
  ##Usage
84
116
 
85
- **Both Opennebula and Redis server must be running prior the next steps.**
117
+ **Both OpenNebula and Redis server must be running prior the next steps.**
86
118
 
87
119
  ###Start sidekiq
88
- First you have to start Sidekiq so it can run the jobs from the queue. Since OneacctExport is not a Rails application Sidekiq has to be started with OneacctExport's worker class as an argument. For example:
120
+ First you have to start Sidekiq so it can run the jobs from the queue. Since
121
+ OneacctExport is not a Rails application Sidekiq has to be started with
122
+ OneacctExport's worker class as an argument. For example:
89
123
 
90
124
  ```bash
91
- sidekiq -r <PATH_TO_GEM_DIR>/lib/one_worker.rb -C <PATH_TO_SIDEKIQ_CONF>/sidekiq.yml
125
+ sidekiq -r $PATH_TO_GEM_DIR/lib/one_worker.rb -C $PATH_TO_GEM_DIR/config/sidekiq.yml
92
126
  ```
93
127
 
94
128
  ###Start OneacctExport
95
129
 
96
- OneacctExport is run with executable `oneacct-export`. For a list of all available options run `oneacct-export -h`:
130
+ OneacctExport is run with executable `oneacct-export`. For a list of all
131
+ available options run `oneacct-export -h`:
97
132
 
98
133
  ```
99
134
  $ oneacct-export -h
@@ -115,13 +150,13 @@ Usage oneacct-export [options]
115
150
  ```
116
151
 
117
152
  ##Code Documentation
118
- [Code Documentation for OneacctExport by YARD](http://rubydoc.info/github/Misenko/oneacct_export/)
153
+ [Code Documentation for OneacctExport by YARD](http://rubydoc.info/github/EGI-FCTF/oneacct_export/)
119
154
 
120
155
  ##Continuous integration
121
- [Continuous integration for OneacctExport by Travis-CI](http://travis-ci.org/Misenko/oneacct_export/)
156
+ [Continuous integration for OneacctExport by Travis-CI](http://travis-ci.org/EGI-FCTF/oneacct_export/)
122
157
 
123
158
  ## Contributing
124
- 1. Fork it ( https://github.com/Misenko/oneacct_export/fork )
159
+ 1. Fork it ( https://github.com/EGI-FCTF/oneacct_export/fork )
125
160
  2. Create your feature branch (`git checkout -b my-new-feature`)
126
161
  3. Commit your changes (`git commit -am 'Add some feature'`)
127
162
  4. Push to the branch (`git push origin my-new-feature`)
@@ -1,43 +1,43 @@
1
- #There are six mandatory parameters:
2
- # site_name
3
- # cloud_type
4
- # endpoint
5
- # output -> output_dir
6
- # output -> output_type
7
- # sidekiq -> queue
1
+ ---
8
2
  defaults: &defaults
9
- site_name: <fill in> #Usually a shor provider name, e.g. CESNET
10
- cloud_type: OpenNebula
11
- endpoint: <fill in> #URL of your OCCI endpoint, e.g. https://fqdn.example.com:80
3
+ site_name: Undefined # Usually a short provider name, e.g. CESNET
4
+ cloud_type: OpenNebula # CMF type, only OpenNebula is supported
5
+ endpoint: https://occi.localhost.com:11443/ # URL of your OCCI endpoint, e.g. https://fqdn.example.com:11443/
12
6
  output:
13
- output_dir: <fill in> #Directory for outgoing messages
14
- output_type: apel-0.2 #Format of outgoing messages. apel-0.2 is currently the only option.
15
- # num_of_vms_per_file: 500 #Maximum number of virtual machine records per one output file.
16
- #
17
- # logging:
18
- # log_type: file #Two options: file, syslog. Defaults to stdout
19
- # log_file: /var/log/oneacct-export.log #Used when type file selected
20
- #
21
- # xml_rpc:
22
- # secret: username:password #If not specified looking for secret in ONE_AUTH and ~/.one/one_auth.
23
- # endpoint: http://localhost:2633/RPC2 #Defaults to content of ONE_XMLRPC or content of ~/.one/one_endpoint or http://localhost:2633/RPC2.
24
- #
25
- # redis:
26
- # namespace: oneacct_export
27
- # url: redis://localhost:6379 #URL of redis server, defaults to redis://localhost:6379.
28
- # password: password #Password to access redis server if needed.
7
+ output_dir: /var/spool/apel/outgoing/00000000 # Directory for outgoing messages
8
+ output_type: apel-0.2 # Format of outgoing messages. apel-0.2 is currently the only option
9
+ num_of_vms_per_file: 500 # Maximum number of virtual machine records per one output file
10
+ logging:
11
+ log_type: file # Two options: file, syslog. Defaults to stdout
12
+ log_file: /var/log/oneacct-export/oneacct-export.log # Used when type file selected
13
+ xml_rpc:
14
+ secret: oneadmin:opennebula # If not specified looking for secret in ONE_AUTH and ~/.one/one_auth
15
+ endpoint: http://localhost:2633/RPC2 # Defaults to content of ONE_XMLRPC or content of ~/.one/one_endpoint or http://localhost:2633/RPC2
16
+ redis:
17
+ namespace: oneacct_export # Namespace used by redis for sidekiq jobs
18
+ url: redis://localhost:6379 # URL of redis server, defaults to redis://localhost:6379
19
+ password: # Password to access redis server if needed
29
20
  sidekiq:
30
- queue: oneacct_export
21
+ queue: oneacct_export # Name of the redis queue used by sidekiq, must match sidekiq.yml configuration
22
+
23
+ ###############################################
24
+ ####### DO NOT EDIT AFTER THIS POINT ########
25
+ ###############################################
26
+
31
27
  production:
32
28
  <<: *defaults
29
+
30
+
33
31
  development:
34
32
  <<: *defaults
33
+
34
+
35
35
  test:
36
36
  site_name: <placeholder>
37
37
  cloud_type: <placeholder>
38
38
  endpoint: <placeholder>
39
39
  output:
40
- output_dir: <placeholder>
40
+ output_dir: <placeholder>
41
41
  output_type: <placeholder>
42
42
  num_of_vms_per_file: <placeholder>
43
43
  logging:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  :concurrency: 5
3
- #:pidfile: ./tmp/pids/sidekiq.pid
4
- #:logfile: ./log/sidekiq.log
3
+ :pidfile: /var/run/oneacct-export/sidekiq.pid
4
+ :logfile: /var/log/oneacct-export/sidekiq.log
5
5
  :queues:
6
6
  - oneacct_export
@@ -1,3 +1,3 @@
1
1
  class OneacctExporter
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oneacct-export
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Kimle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-13 00:00:00.000000000 Z
11
+ date: 2014-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler