itamae-plugin-recipe-ros 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +55 -18
- data/exe/create_itamae_ros_templates +2 -0
- data/lib/itamae/plugin/recipe/ros/create_ws.rb +22 -0
- data/lib/itamae/plugin/recipe/ros/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91efc6cbf3acd63c29f517b93baa9b4098acbaa7
|
4
|
+
data.tar.gz: 9cce4089c5aa08284d124792c539f47d9418db6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 573eaf559ffd0e000d506d5e926b7c31e0ff643a473856e47e7ccba6e7d1579be6010cc9924fff2e0b15f71c644fdcaad180b2b85ec0a762a60eea0d6322951a
|
7
|
+
data.tar.gz: 2462815f3a4f8fd4b5e4383064a894221caa04dcb778fdac104a3489a0d65e5d232322053e90b8fa91af92e124b96ccc1ee100844f127ee16141f6cc556f72ae
|
data/README.md
CHANGED
@@ -20,31 +20,26 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
###
|
23
|
+
### Recipes
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
Recipe | Description
|
26
|
+
------- | -----------
|
27
|
+
install | Install ROS on your env
|
28
|
+
create_ws | Create a catkin workspace
|
29
29
|
|
30
30
|
### Node Attributes
|
31
31
|
|
32
|
-
Attribute Type |
|
33
|
-
------------- |
|
34
|
-
distribution | [jade, indigo]
|
35
|
-
install-target | [desktop-full, desktop, ros-base]
|
32
|
+
Attribute Type | Values | Recipe
|
33
|
+
------------- | ---------------- | ------
|
34
|
+
distribution | [jade, indigo] | install
|
35
|
+
install-target | [desktop-full, desktop, ros-base] | install
|
36
|
+
ws-name | | create_ws
|
36
37
|
|
37
|
-
You
|
38
|
+
You have to add "ros" as the prefix of each attribute.
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
```yaml
|
42
|
-
ros:
|
43
|
-
distribution: indigo
|
44
|
-
install-target: desktop-full
|
45
|
-
```
|
40
|
+
### Quick Start
|
46
41
|
|
47
|
-
|
42
|
+
Generate itamae template files.
|
48
43
|
|
49
44
|
```sh
|
50
45
|
$ mkdir itamae_ros && cd itamae_ros
|
@@ -58,6 +53,48 @@ $ tree -L 1
|
|
58
53
|
┗ itamae_ros_recipe.rb
|
59
54
|
```
|
60
55
|
|
56
|
+
**itamae_ros_node.yaml**
|
57
|
+
|
58
|
+
```yaml
|
59
|
+
ros:
|
60
|
+
distribution: indigo
|
61
|
+
install-target: desktop-full
|
62
|
+
ws-name: catkin_ws
|
63
|
+
```
|
64
|
+
|
65
|
+
**itamae_ros_recipe.rb**
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
include_recipe "ros::install"
|
69
|
+
include_recipe "ros::create_ws"
|
70
|
+
```
|
71
|
+
|
72
|
+
Please see the examples below, if you want to know how to use these files on itamae.
|
73
|
+
|
74
|
+
* To the vagrant via ssh
|
75
|
+
|
76
|
+
```sh
|
77
|
+
$ itamae ssh --vagrant -h default -y itamae_ros_node.yaml itamae_ros_recipe.rb
|
78
|
+
```
|
79
|
+
|
80
|
+
* On the local environment
|
81
|
+
|
82
|
+
```sh
|
83
|
+
$ itamae local -y itamae_ros_node.yaml itamae_ros_recipe.rb
|
84
|
+
```
|
85
|
+
|
86
|
+
* Or you can apply a recipe to a remote machine by `itamae ssh`
|
87
|
+
|
88
|
+
```sh
|
89
|
+
$ itamae ssh \
|
90
|
+
-h 192.168.23.105 \
|
91
|
+
-p 33 \
|
92
|
+
-u name \
|
93
|
+
-i insecure_private_key \
|
94
|
+
-y itamae_ros_node.yaml \
|
95
|
+
itamae_ros_recipe.rb
|
96
|
+
```
|
97
|
+
|
61
98
|
## Contributing
|
62
99
|
|
63
100
|
Bug reports and pull requests are welcome on GitHub at https://github.com/DaikiMaekawa/itamae-plugin-recipe-ros. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
@@ -4,10 +4,12 @@ File.open("itamae_ros_node.yaml", "w") do |file|
|
|
4
4
|
file.puts("ros:")
|
5
5
|
file.puts(" distribution: jade")
|
6
6
|
file.puts(" install-target: desktop-full")
|
7
|
+
file.puts(" ws-name: catkin_ws")
|
7
8
|
end
|
8
9
|
|
9
10
|
File.open("itamae_ros_recipe.rb", "w") do |file|
|
10
11
|
file.puts("include_recipe \"ros::install\"")
|
12
|
+
file.puts("include_recipe \"ros::create_ws\"")
|
11
13
|
end
|
12
14
|
|
13
15
|
File.open("Gemfile", "w") do |file|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
|
2
|
+
ros_cmd = "/opt/ros/%s/env.sh " % node[:'ros']['distribution']
|
3
|
+
|
4
|
+
directory node[:'ros']['ws-name'] + "/src"
|
5
|
+
|
6
|
+
execute 'Initialize a catkin workspace' do
|
7
|
+
not_if 'test -e CMakeLists.txt'
|
8
|
+
cwd node[:'ros']['ws-name'] + "/src"
|
9
|
+
command ros_cmd + 'catkin_init_workspace'
|
10
|
+
end
|
11
|
+
|
12
|
+
execute 'catkin_make' do
|
13
|
+
cwd node[:'ros']['ws-name']
|
14
|
+
command ros_cmd + 'catkin_make'
|
15
|
+
end
|
16
|
+
|
17
|
+
execute 'Environment setup' do
|
18
|
+
add_cmd = "source %s/devel/setup.bash" % node[:'ros']['ws-name']
|
19
|
+
not_if 'grep "%s" ~/.bashrc' % add_cmd
|
20
|
+
command 'echo "%s" >> ~/.bashrc' % add_cmd
|
21
|
+
end
|
22
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-plugin-recipe-ros
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daiki Maekawa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: itamae
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- exe/create_itamae_ros_templates
|
69
69
|
- itamae-plugin-recipe-ros.gemspec
|
70
70
|
- lib/itamae/plugin/recipe/ros.rb
|
71
|
+
- lib/itamae/plugin/recipe/ros/create_ws.rb
|
71
72
|
- lib/itamae/plugin/recipe/ros/install.rb
|
72
73
|
- lib/itamae/plugin/recipe/ros/version.rb
|
73
74
|
homepage: https://github.com/DaikiMaekawa/itamae-plugin-recipe-ros
|