cookbook 'stash', '= 4.2.0'
stash
(53) Versions
4.2.0
-
-
5.0.0
-
4.5.2
-
4.5.1
-
4.5.0
-
4.4.0
-
4.3.0
-
4.2.0
-
4.1.0
-
4.0.1
-
4.0.0
-
3.16.1
-
3.16.0
-
3.15.0
-
3.14.4
-
3.14.3
-
3.14.2
-
3.14.1
-
3.14.0
-
3.13.0
-
3.12.1
-
3.12.0
-
3.11.1
-
3.11.0
-
3.10.1
-
3.10.0
-
3.9.1
-
3.9.0
-
3.8.3
-
3.8.1
-
3.7.0
-
3.6.0
-
3.5.0
-
3.4.0
-
3.3.0
-
3.2.0
-
3.1.1
-
3.1.0
-
3.0.1
-
3.0.0
-
2.21.0
-
2.20.0
-
2.19.0
-
2.18.0
-
2.17.0
-
2.16.0
-
2.15.0
-
2.14.0
-
2.13.0
-
2.12.0
-
2.10.1
-
2.10.0
-
2.9.0
-
2.6.1
Follow24
- 5.0.0
- 4.5.2
- 4.5.1
- 4.5.0
- 4.4.0
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.1
- 4.0.0
- 3.16.1
- 3.16.0
- 3.15.0
- 3.14.4
- 3.14.3
- 3.14.2
- 3.14.1
- 3.14.0
- 3.13.0
- 3.12.1
- 3.12.0
- 3.11.1
- 3.11.0
- 3.10.1
- 3.10.0
- 3.9.1
- 3.9.0
- 3.8.3
- 3.8.1
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.1
- 3.1.0
- 3.0.1
- 3.0.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.10.1
- 2.10.0
- 2.9.0
- 2.6.1
Installs/Configures Atlassian Stash
cookbook 'stash', '= 4.2.0', :supermarket
knife supermarket install stash
knife supermarket download stash
chef-stash
Description
Installs/Configures Atlassian Stash / Atlassian Bitbucket server and Atlassian Stash Backup Client. Provides LWRPs for code deployment via Stash as well as for hook and repository management. Please see [COMPATIBILITY.md](COMPATIBILITY.md) for more information about Stash releases (versions and checksums) that are tested and supported by cookbook versions.
Requirements
Platforms
- CentOS 6, 7
- RHEL 6, 7
- Ubuntu 12.04, 14.04
Chef
- Version 3.X of cookbook requires Chef 11 due to
ark
usage
Databases
- HSQLDB (not recommended for production usage)
- Microsoft SQL Server
- MySQL
- Postgres
Cookbooks
Required Opscode Cookbooks
- apache2 (if using Apache 2 proxy)
- ark
- cron
- database
- git
- java
- mysql (if using MySQL database)
- perl
- postgresql (if using Postgres database)
Third-Party Cookbooks
- mysql_connector (if using MySQL database)
Attributes
These attributes are under the node['stash']
namespace.
Attribute | Description | Type | Default |
---|---|---|---|
checksum | SHA256 checksum for Stash install | String | auto-detected (see attributes/default.rb) |
home_path | home data directory for Stash user | String | /var/atlassian/application-data/bitbucket (if upgrading from 3.x cookbook it will be /var/atlassian/application-data/stash) |
install_path | location to install Stash | String | /opt/atlassian |
install_type | Stash install type - "standalone" only for now | String | standalone |
url_base | URL base for Stash install | String | http://www.atlassian.com/software/stash/downloads/binary/atlassian-stash |
url | URL for Stash install | String | auto-detected (see attributes/default.rb) |
user | user to run Stash | String | stash |
version | Stash version to install | String | 4.3.2 |
Stash Backup Attributes (Shared)
These attributes are under the node['stash']['backup']
namespace. Some of these attributes are overridden by stash/stash
encrypted data bag (Hosted Chef) or data bag (Chef Solo), if it exists.
Attribute | Description | Type | Default |
---|---|---|---|
backup_path | Path for backups | String | /tmp |
baseurl | Stash base URL | String | https://#{node['fqdn']}/ |
password | Stash administrative user password | String | changeit |
strategy | Stash backup strategy: 'backup_client' or 'backup_diy' | String | backup_client |
user | Stash administrative user | String | admin |
Stash Backup Client Attributes
Documentation: Using the Stash Backup Client
These attributes are under the node['stash']['backup_client']
namespace. Some of these attributes are overridden by stash/stash
encrypted data bag (Hosted Chef) or data bag (Chef Solo), if it exists.
Attribute | Description | Type | Default |
---|---|---|---|
checksum | SHA256 checksum for Stash Backup Client install | String | auto-detected (see attributes/default.rb) |
install_path | location to install Stash Backup Client | String | /opt/atlassian/stash-backup-client |
url_base | URL base for Stash Backup Client install | String | http://downloads.atlassian.com/software/stash/downloads/stash-backup-distribution |
version | Stash Backup Client version to install | String | 2.0.2 |
Stash DIY Backup Attributes
Documentation: Using Stash DIY Backup
These attributes are under the node['stash']['backup_diy']
namespace. Some of these attributes are overridden by stash/stash
encrypted data bag (Hosted Chef) or data bag (Chef Solo), if it exists.
Attribute | Description | Type | Default |
---|---|---|---|
backup_archive_type | The way how to backup the stash home | String | tar |
backup_home_type | The way how to backup the stash home | String | rsync |
exclude_repos | List of repo IDs which should be excluded from the backup | List | [] |
gpg_recipient | GPG recipient name (only if ['backup_archive_type]' is 'tar-gpg' ) |
String | "" |
install_path | location to place Stash DIY Backup scripts | String | /opt/atlassian/stash-diy-backup |
hipchat_room | HipChat room where notifications should be sent | String | "" |
hipchat_token | Authorization token for the HipChat server | String | "" |
hipchat_url | URL to the HipChat server for sending notifications | String | 'https://api.hipchat.com' |
repo_url | Git repository URL where Stash DIY Backup scripts are stored | String | https://bitbucket.org/atlassianlabs/atlassian-stash-diy-backup.git |
revision | Git revision (or a branch, or a tag) wich should be checked out | String | master |
temp_path | A temporary path where backup essentials should be placed before packing to the archive | String | /tmp/stash-backup-temp |
verbose | Should the script output be verbose or not | Boolean | true |
Stash Backup Cron Attributes
These attributes are under the node['stash']['backup']['cron']
namespace. All of these attributes are overridden by stash/stash
encrypted data bag (Hosted Chef) or data bag (Chef Solo), if it exists.
Attribute | Description | Type | Default |
---|---|---|---|
enable | Configure cron job to backup Stash periodically | Boolean | false |
day | Day of month | String | * |
hour | Hour of day | String | 0 |
minute | Minute of hour | String | 0 |
month | Month of year | String | * |
weekday | Day of week | String | * |
Stash Database Attributes
The default database will be changing to postgresql when cookbook 4.x is released.
All of these node['stash']['database']
attributes are overridden by stash/stash
encrypted data bag (Hosted Chef) or data bag (Chef Solo), if it exists
Attribute | Description | Type | Default |
---|---|---|---|
host | FQDN or "127.0.0.1" (127.0.0.1 automatically installs ['database']['type'] server) |
String | 127.0.0.1 |
name | Stash database name | String | stash |
password | Stash database user password | String | changeit |
port | Stash database port | String | 5432 |
testInterval | Stash database pool idle test interval in minutes | Fixnum | 2 |
type | Stash database type - "hsqldb" (not recommended), "mysql", "postgresql", or "sqlserver" | String | postgresql |
user | Stash database user | String | stash |
Stash JVM Attributes
These attributes are under the node['stash']['jvm']
namespace.
Attribute | Description | Type | Default |
---|---|---|---|
minimum_memory | JVM minimum memory | String | 512m |
maximum_memory | JVM maximum memory | String | 768m |
maximum_permgen | JVM maximum PermGen memory | String | 384m |
java_opts | additional JAVA_OPTS to be passed to Stash JVM during startup | String | "" |
support_args | additional JAVA_OPTS recommended by Atlassian support for Stash JVM during startup | String | "" |
Stash Property Attributes
The usage of node['stash']['plugin']
for properties is deprecated in 3.x of the cookbook and may change or be removed in 4.x
All of these node['stash']['properties']
attributes are overridden by stash/stash
encrypted data bag (Hosted Chef) or data bag (Chef Solo), if it exists.
Attribute | Description | Type | Default |
---|---|---|---|
key |
A key/value pair to be inserted into stash-config.properties as key =value
|
Hash | {} |
Stash SSH Attributes
These attributes are under the node['stash']['ssh']
namespace.
Attribute | Description | Type | Default |
---|---|---|---|
hostname | Stash SSH hostname | String | node['fqdn'] |
port | Stash SSH port | Fixnum | 7999 |
uri | Stash SSH URI | String | ssh://git@#{node['stash']['ssh']['hostname']}:#{node['stash']['ssh']['port']} |
Stash Tomcat Attributes
These attributes are under the node['stash']['tomcat']
namespace.
Attribute | Description | Type | Default |
---|---|---|---|
port | Tomcat HTTP port | Fixnum | 7990 |
Recipes
-
recipe[stash]
Installs Atlassian Stash with built-in Tomcat and Apache 2 proxy -
recipe[stash::apache2]
Installs/configures Apache 2 proxy for Stash (ports 80/443) -
recipe[stash::backup_client]
Installs/configures Atlassian Stash Backup Client -
recipe[stash::backup_client_cron]
Installs/configures Atlassian Stash Backup Client cron.d -
recipe[stash::configuration]
Configures Stash's settings -
recipe[stash::database]
Installs/configures MySQL/Postgres server, database, and user for Stash -
recipe[stash::linux_standalone]
Installs/configures Stash via Linux standalone archive -
recipe[stash::service_init]
Installs/configures Stash init service -
recipe[stash::tomcat_configuration]
Configures Stash's built-in Tomcat
LWRPs
-
stash_deploy
- wrapper Git resource for using astash_deploy_key
, project, and repository for code deployment -
stash_deploy_key
- creates SSH private key file and SSH wrapper for code deployment -
hook
- Wrapper to enable/disable/configure a stash hook (requires the user account password to be in chef-vault) -
repo
- Wrapper to create/delete a stash repository (requires the user account password to be in chef-vault)
Usage
Stash Server Data Bag
For security purposes it is recommended to use data bag for storing secrets
like passwords and database credentials.
You can override any attributes from the ['stash']
namespace using the
stash/stash
data bag. It could be either encrypted or not
encrypted by your choice.
Example:
json
{
"id": "stash",
"stash": {
"database": {
"type": "postgresql",
"host": "127.0.0.1",
"name": "stash",
"user": "stash",
"password": "stash_db_password",
}
}
}
(Note - "stash"
nesting level is required!)
These credentials will be used for your stash installation instead of
appropriate attribute values.
Data bag's and item's names are optional and can be changed by overriding
attributes ['stash']['data_bag_name']
and ['stash']['data_bag_item']
Stash Server Default Installation
- Optionally use (un)encrypted data bag or set attributes
knife data bag create stash
knife data bag edit stash stash --secret-file=path/to/secret
- Add
recipe[stash]
to your node's run list.
Stash Backup Client Installation
- Optionally use (un)encrypted data bag or set attributes
knife data bag create stash
knife data bag edit stash stash --secret-file=path/to/secret
- Add
recipe[stash]['backup_client']
to your node's run list.
Stash Backup Client Cron Installation
- Optionally use (un)encrypted data bag or set attributes
knife data bag create stash
knife data bag edit stash stash --secret-file=path/to/secret
- Add
recipe[stash]['backup_client_cron']
to your node's run list.
Code Deployment From Stash
- Ensure your node has Git installed
- Create a
stash_deploy_key
with the SSH private key contents (using\n
for newlines) of a Stash user with permissions to your repository.
For example:
stash_deploy_key "deployment_user" do
key "-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIB..."
end
- In this example, now you can either directly use the ssh_wrapper available at
#{node['stash']['install_path']}/deployment_user_ssh_wrapper.sh
or use thestash_deploy
LWRP.
Such as:
stash_deploy "/opt/shibboleth-idp/conf" do
deploy_key "deployment_user"
project "SHIBIDP"
repository "configuration"
end
Testing and Development
Here's how you can quickly get testing or developing against the cookbook thanks to Vagrant and Berkshelf.
vagrant plugin install vagrant-berkshelf
vagrant plugin install vagrant-cachier
vagrant plugin install vagrant-omnibus
git clone git://github.com/bflad/chef-stash.git
cd chef-stash
vagrant up BOX # BOX being centos5, centos6, debian7, fedora18, fedora19, fedora20, freebsd9, ubuntu1204, ubuntu1210, ubuntu1304, or ubuntu1310
You need to add the following hosts entries:
- 192.168.50.10 stash-centos-6
- 192.168.50.10 stash-ubuntu-1204
- (etc.)
The running Stash server is accessible from the host machine:
CentOS 6 Box:
* Web UI: https://stash-centos-6/
* Stash SSH: ssh://git@stash-centos-6:7999/
Ubuntu 12.04 Box:
* Web UI: https://stash-ubuntu-1204/
* Stash SSH: ssh://git@stash-ubuntu-1204:7999/
You can then SSH into the running VM using the vagrant ssh BOX
command.
The VM can easily be stopped and deleted with the vagrant destroy
command. Please see the official Vagrant documentation for a more in depth explanation of available commands.
Test Kitchen
Please see documentation in: [TESTING.md](TESTING.md)
Contributing
Please use standard Github issues/pull requests and if possible, in combination with testing on the Vagrant boxes.
License and Contributors
Please see license information in: [LICENSE](LICENSE)
- Brian Flad (bflad417@gmail.com)
- Kevin Moser (@moserke)
- Ramon Makkelie (@ramonskie)
- Martin (@martianus)
- Mikhail Zholobov (@legal90)
- Claudio Rivabene (@crivabene)
- Patrick Connolly (@patcon)
- Benjamin Neff (@SuperTux88)
- Lincoln Lee (@linc01n)
Dependent cookbooks
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Change Log
4.2.0 (2016-02-15)
Implemented enhancements:
Closed issues:
Merged pull requests:
- Set database type when running mysql suite #139 (linc01n)
- Redirect HTTP to HTTPS #137 (legal90)
- Disable https on the Tomcat side #136 (legal90)
- Add newer Bitbucket Server versions #135 (legal90)
- .kitchen.yml: Rename Vagrant boxes "chef" -> "bento" #134 (legal90)
4.1.0 (2016-01-20)
Merged pull requests:
- Prepare for 4.1.0 cookbook release #133 (linc01n)
- Upgrade bitbucket to 4.3.0 and backup client to 2.0.2 #132 (linc01n)
4.0.1 (2016-01-01)
Merged pull requests:
- Prepare for 4.0.1 cookbook release #131 (linc01n)
- Add Bitbucket versions 4.2.0 #130 (linc01n)
- Update readme #129 (linc01n)
4.0.0 (2015-12-06)
Implemented enhancements:
- Move pid file to /var/run #100
- Need to upgrade the conf/web.xml for 3.10.0 #97
- Upgrade database/mysql/postgresql dependencies as necessary #58
Fixed bugs:
- Cannot install mysql-client 5.6 on Ubuntu 12.04 #111
Closed issues:
- make create directory recursive #117
- Need any new co-maintainers? #106
- Update test-kitchen tests #96
Merged pull requests:
- 4.0 release #128 (linc01n)
- Set home path to 3.x default when it exists #127 (linc01n)
- Fix hard-coded JAVA_HOME ENV #125 (linc01n)
- Upgrade bitbucket to 4.1.0 #124 (linc01n)
- Upgrade bitbucket to 4.0.3 #122 (linc01n)
- Add recursive folder creation to DIY backup #121 (linc01n)
- Upgrade bitbucket to 4.0.2 #119 (linc01n)
- Create backup folder recusively #118 (linc01n)
- Add Bitbucket Server 4.0 Support #116 (SuperTux88)
- fix rubocop offenses from master #115 (SuperTux88)
- bump stash to the latest version #114 (ramonskie)
- Match Kitchen network config with Vagrantfile #113 (linc01n)
- Switch to using MySQL 5.5 by default #112 (patcon)
- Add DIY backup and Move pid file #110 (linc01n)
- Add postgresql test suite #107 (patcon)
- Migrate to serverspec tests #105 (patcon)
- Remove apache2 test-kitchen suite #104 (patcon)
- Update mysql cookbook (6.x) and database cookbook #103 (patcon)
- Move pid to /var/run/stash/catalina.pid #102 (linc01n)
- Add and default to Stash 3.10.2 #101 (linc01n)
- Upgrade web.xml to latest version #98 (linc01n)
3.16.1 (2015-06-20)
Fixed bugs:
- umask warning when restarting (in vagrant ubuntu1404) #92
Merged pull requests:
- Prepare for 3.16.1 cookbook release #94 (linc01n)
- Set umask to 0027 for more secure file creation #93 (linc01n)
3.16.0 (2015-06-19)
Fixed bugs:
- Stash Crashes Due to java.lang.OutOfMemoryError PermGen Space Error #84
Closed issues:
- Vagrant failed for Ubuntu 1404 install #86
Merged pull requests:
- Prepare for 3.16.0 cookbook release #91 (linc01n)
- Do a apt-get update before running package install #90 (linc01n)
- Use proper setenv.sh format for v3.8+. #89 (patcon)
- Fix minor rubocop style errors #88 (patcon)
- Add support of Stash versions 3.8.1, 3.9.1, 3.9.2, 3.10.0 #87 (legal90)
3.15.0 (2015-04-22)
Merged pull requests:
- Prepare for 3.15.0 cookbook release #83 (linc01n)
- Upgrade stash to 3.8.0 and backup client to 1.8.2 #82 (linc01n)
- Speedup travis build #81 (linc01n)
3.14.4 (2015-03-17)
Fixed bugs:
- service stash start|restart|stop|status not working on CentOS 7 #67
Merged pull requests:
3.14.3 (2015-03-13)
Merged pull requests:
- Prepare for 3.14.3 cookbook release #78 (linc01n)
- Upgrade Stash to 3.7.1 #77 (crivabene)
- Fix ubuntu version #76 (linc01n)
- Upgrade stash to 3.7.0 and backup client to 1.7.0 #75 (linc01n)
3.14.2 (2015-02-12)
Merged pull requests:
3.14.1 (2015-02-11)
Fixed bugs:
- Missing mysql-chef_gem cookbook #69
Merged pull requests:
- Prepare for 3.14.1 cookbook release #72 (linc01n)
- Lock database cookbook to 2.3.1 #71 (linc01n)
- Fix rubocop offenses #70 (linc01n)
- Extend license year to 2015 #66 (linc01n)
- Add contributors #65 (linc01n)
- Bump dependencies in Gemfile #62 (bflad)
- Fixed deprecation warning from Berkshelf #61 (legal90)
3.14.0 (2015-01-24)
Fixed bugs:
- cookbook is broker because of no versionlock in metadata #55
Merged pull requests:
- Prepare 3.14.0 release, begin documenting 4.0.0 changes #60 (bflad)
- Split metadata supports/depends, lock mysql ~> 5.0, fixes #55 #59 (bflad)
- Documentation surrounding properties versus now deprecated plugins #57 (bflad)
- the ability to set all property values instead of only the plugins #46 (ramonskie)
3.13.0 (2015-01-23)
Closed issues:
- Support Stash 3.6.0 #47
- all http auth not working when using apache (eg git clone) #42
- 3.12.0 is not yet release to supermarket #40
Merged pull requests:
- Prepare for 3.13.0 cookbook release #54 (bflad)
- Rubocop fixes and ignores #53 (bflad)
- Default to Stash 3.6.0, Stash Backup Client 1.6.0, resolves #47 #52 (bflad)
- Convert Test Kitchen and Vagrant to Atlas boxes #51 (bflad)
- Add Stash version default checksums for 3.1.7, 3.2.7, 3.3.3, 3.3.5, 3.4.1, 3.4.3, 3.4.5, 3.5.0, 3.5.1, and 3.6.0 #48 (bflad)
- Fixed HTTP authentication #45 (legal90)
- Fixes for the Stash library #44 (legal90)
- Fix for "sh: 'rsync' no such file or directory" on RHEL-like systems #43 (legal90)
- Upgrade Stash to 3.4.0 #41 (linc01n)
3.12.1 (2014-10-21)
3.12.0 (2014-10-21)
Merged pull requests:
3.11.0 (2014-10-06)
Closed issues:
- stash 3.2 directories changed #35
Merged pull requests:
3.10.1 (2014-07-10)
Merged pull requests:
- updated stash to 3.1.1 #33 (ramonskie)
- support apache 2.4 access control syntax #32 (andrewgoktepe)
3.10.0 (2014-06-26)
Merged pull requests:
3.9.1 (2014-06-24)
Merged pull requests:
3.9.0 (2014-05-21)
3.8.3 (2014-05-21)
Merged pull requests:
3.8.2 (2014-05-07)
Merged pull requests:
3.8.1 (2014-04-22)
Merged pull requests:
3.8.0 (2014-03-26)
Merged pull requests:
3.7.0 (2014-02-28)
Closed issues:
- first-time setup with database does not work #16
Merged pull requests:
3.6.0 (2014-01-03)
Merged pull requests:
3.5.0 (2013-12-08)
3.4.0 (2013-12-08)
Merged pull requests:
3.3.0 (2013-11-24)
3.2.0 (2013-11-18)
3.1.2 (2013-11-18)
Closed issues:
- Random hibernate exceptions giving me the 500 page #19
- stash.tar.gz unzip fails #17
- Cannot find a resource matching java_ark[jdk] #15
3.1.1 (2013-11-04)
Closed issues:
3.1.0 (2013-11-03)
3.0.1 (2013-10-19)
3.0.0 (2013-10-12)
Closed issues:
- isn't it better to use ark for downloading stash? #9
2.21.0 (2013-10-08)
Merged pull requests:
2.20.0 (2013-10-04)
Merged pull requests:
2.19.0 (2013-08-21)
2.18.0 (2013-08-21)
2.17.0 (2013-08-12)
2.16.0 (2013-08-08)
2.15.0 (2013-07-24)
2.14.0 (2013-06-18)
2.13.0 (2013-05-30)
2.12.0 (2013-05-10)
2.11.0 (2013-05-07)
Closed issues:
- Add LWRP for stash hooks and repositories #4
2.10.1 (2013-05-06)
2.10.0 (2013-05-06)
Merged pull requests:
2.9.0 (2013-05-06)
2.8.0 (2013-04-22)
2.7.0 (2013-04-20)
2.6.1 (2013-04-08)
2.6.0 (2013-03-28)
2.5.0 (2013-03-19)
2.4.0 (2013-02-08)
2.3.1 (2013-02-07)
2.3.0 (2013-02-07)
2.1.8 (2013-01-16)
2.1.7 (2013-01-16)
2.1.6 (2012-12-23)
2.1.5 (2012-12-19)
2.1.4 (2012-12-19)
2.1.3 (2012-12-19)
2.1.2 (2012-12-19)
2.1.1 (2012-12-19)
2.1.0 (2012-12-18)
2.0.2 (2012-11-16)
2.0.1 (2012-11-06)
2.0.0 (2012-11-05)
Closed issues:
- Add Minitests #1
1.0.3 (2012-11-02)
1.0.2 (2012-11-02)
1.0.1 (2012-10-26)
1.0.0 (2012-10-11)
Closed issues:
- Upgrade recipe does not extract over installation #3
0.2.16 (2012-09-24)
0.2.15 (2012-09-24)
0.2.14 (2012-09-24)
0.2.13 (2012-09-24)
Closed issues:
- TravisCI Integration #2
0.2.12 (2012-09-21)
0.2.11 (2012-09-20)
0.2.10 (2012-09-19)
0.2.9 (2012-09-19)
0.2.8 (2012-09-19)
0.2.7 (2012-09-19)
0.2.6 (2012-09-19)
0.2.5 (2012-09-19)
0.2.4 (2012-09-19)
0.2.3 (2012-09-19)
0.2.2 (2012-09-19)
0.2.1 (2012-09-19)
* This Change Log was automatically generated by github_changelog_generator
Foodcritic Metric
4.2.0 passed this metric
4.2.0 passed this metric