Set up an instance of Mastodon for Kosmos
Refs #19 Use new application cookbook, update our cookbooks
This commit is contained in:
11
site-cookbooks/kosmos-ruby/CHANGELOG.md
Normal file
11
site-cookbooks/kosmos-ruby/CHANGELOG.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# kosmos-ruby CHANGELOG
|
||||
|
||||
This file is used to list changes made in each version of the kosmos-ruby cookbook.
|
||||
|
||||
## 0.1.0
|
||||
- [your_name] - Initial release of kosmos-ruby
|
||||
|
||||
- - -
|
||||
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
|
||||
|
||||
The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
|
||||
80
site-cookbooks/kosmos-ruby/README.md
Normal file
80
site-cookbooks/kosmos-ruby/README.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# kosmos-ruby Cookbook
|
||||
|
||||
TODO: Enter the cookbook description here.
|
||||
|
||||
e.g.
|
||||
This cookbook makes your favorite breakfast sandwich.
|
||||
|
||||
## Requirements
|
||||
|
||||
TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc.
|
||||
|
||||
e.g.
|
||||
### Platforms
|
||||
|
||||
- SandwichOS
|
||||
|
||||
### Chef
|
||||
|
||||
- Chef 12.0 or later
|
||||
|
||||
### Cookbooks
|
||||
|
||||
- `toaster` - kosmos-ruby needs toaster to brown your bagel.
|
||||
|
||||
## Attributes
|
||||
|
||||
TODO: List your cookbook attributes here.
|
||||
|
||||
e.g.
|
||||
### kosmos-ruby::default
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Key</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Default</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>['kosmos-ruby']['bacon']</tt></td>
|
||||
<td>Boolean</td>
|
||||
<td>whether to include bacon</td>
|
||||
<td><tt>true</tt></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Usage
|
||||
|
||||
### kosmos-ruby::default
|
||||
|
||||
TODO: Write usage instructions for each cookbook.
|
||||
|
||||
e.g.
|
||||
Just include `kosmos-ruby` in your node's `run_list`:
|
||||
|
||||
```json
|
||||
{
|
||||
"name":"my_node",
|
||||
"run_list": [
|
||||
"recipe[kosmos-ruby]"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.
|
||||
|
||||
e.g.
|
||||
1. Fork the repository on Github
|
||||
2. Create a named feature branch (like `add_component_x`)
|
||||
3. Write your change
|
||||
4. Write tests for your change (if applicable)
|
||||
5. Run the tests, ensuring they all pass
|
||||
6. Submit a Pull Request using Github
|
||||
|
||||
## License and Authors
|
||||
|
||||
Authors: TODO: List authors
|
||||
|
||||
1
site-cookbooks/kosmos-ruby/attributes/default.rb
Normal file
1
site-cookbooks/kosmos-ruby/attributes/default.rb
Normal file
@@ -0,0 +1 @@
|
||||
default['kosmos-ruby']['version'] = '2.3'
|
||||
7
site-cookbooks/kosmos-ruby/metadata.rb
Normal file
7
site-cookbooks/kosmos-ruby/metadata.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
name 'kosmos-ruby'
|
||||
maintainer 'Kosmos'
|
||||
maintainer_email 'mail@kosmos.org'
|
||||
license 'All rights reserved'
|
||||
description 'Installs/Configures kosmos-ruby'
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version '0.1.0'
|
||||
54
site-cookbooks/kosmos-ruby/recipes/default.rb
Normal file
54
site-cookbooks/kosmos-ruby/recipes/default.rb
Normal file
@@ -0,0 +1,54 @@
|
||||
#
|
||||
# Cookbook Name:: kosmos-ruby
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright 2017, Kosmos
|
||||
#
|
||||
# All rights reserved - Do Not Redistribute
|
||||
#
|
||||
|
||||
package_name = "ruby#{node['kosmos-ruby']['version']}"
|
||||
|
||||
apt_repository 'brightbox_ruby' do
|
||||
uri 'http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu'
|
||||
distribution node['lsb']['codename']
|
||||
components ['main']
|
||||
keyserver 'keyserver.ubuntu.com'
|
||||
key '80F70E11F0F0D5F10CB20E62F5DA5F09C3173AA6'
|
||||
end
|
||||
|
||||
packages = [
|
||||
"ruby#{node['kosmos-ruby']['version']}",
|
||||
"ruby#{node['kosmos-ruby']['version']}-dev",
|
||||
"build-essential",
|
||||
"libssl-dev",
|
||||
"zlib1g-dev"
|
||||
]
|
||||
|
||||
apt_package packages do
|
||||
action :install
|
||||
end
|
||||
|
||||
apt_package 'ruby-switch' do
|
||||
action :install
|
||||
notifies :run, 'execute[set default ruby]', :immediately
|
||||
end
|
||||
|
||||
execute 'set default ruby' do
|
||||
command "ruby-switch --set #{package_name}"
|
||||
action :nothing
|
||||
notifies :reload, 'ohai[reload]', :immediately
|
||||
end
|
||||
|
||||
ohai 'reload' do
|
||||
action :nothing
|
||||
end
|
||||
|
||||
execute 'update rubygems' do
|
||||
command 'gem update --system 2.6.8'
|
||||
not_if "gem --version | grep ^2.6.8$"
|
||||
end
|
||||
|
||||
gem_package "bundler" do
|
||||
version "1.13.2"
|
||||
end
|
||||
Reference in New Issue
Block a user