cookbook 'bitbucket_server', '= 0.1.7'
bitbucket_server (6) Versions 0.1.7 Follow5
Installs/Configures bitbucket_server
cookbook 'bitbucket_server', '= 0.1.7', :supermarket
knife supermarket install bitbucket_server
knife supermarket download bitbucket_server
Bitbucket server cookbook
Requirements
Platforms
- CentOS 7
Chef
Chef 12.4+
Dependant cookbooks
- ark
- git
- java
- unzip (to be used if required for backup_client resource)
Note: We intend to remove java and git dependancies from this cook book in future.
Bitbucket version
This cookbook only supports bitbucket server versions of 5.0.0 and above
Usage
This is a library cookbook. You can use the resources it provides in your wrapper cookbook / recipe.
Custom resources
bitbucket_install
This resource installs a bitbucket server and sets the BITBUCKET_HOME
. It expects the JAVA_HOME
to be set. If it is not, then jre_home
has to be set as an attribute. The usage is:
ruby
bitbucket_install 'bitbucket' do
jre_home "#{node['java']['java_home']}/jre"
end
Below are the attributes supported by this resource:
Property | String | default | required |
---|---|---|---|
product | String | bitbucket | false |
version | String | 5.0.1 | false |
bitbucket_user | String | atlbitbucket | false |
bitbucket_group | String | atlbitbucket | false |
home_path | String | /var/atlassian/application-data/bitbucket | false |
install_path | String | /opt/atlassian | false |
checksum | String | 677528dffb770fab9ac24a2056ef7be0fc41e45d23fc2b1d62f04648bfa07fad | false |
url_base | String | http://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket | false |
jre_home | String | false | |
jvm_args | String | false |
To unit test the usage of this resource you can use install_bitbucket
matcher in chefspec like:
expect(chef_run).to install_bitbucket('bitbucket').with_jre_home('/usr/lib/jvm/java-8-oracl/jre')
bitbucket_config
This resource configures an already installed bitbucket. The configurations can be provided as a Hash
. Below is the usage:
ruby
bitbucket_config 'bitbucket' do
bitbucket_properties node['bitbucket']['properties']
end
or
ruby
bitbucket_config 'bitbucket' do
bitbucket_properties {'setup.displayName' => 'aasdasd','setup.baseUrl' => 'http://localhost:7990'}
end
Below are the attributes supported by this resource:
Property | String | default | required |
---|---|---|---|
product | String | bitbucket | false |
bitbucket_user | String | atlbitbucket | false |
bitbucket_group | String | atlbitbucket | false |
home_path | String | /var/atlassian/application-data/bitbucket | false |
bitbucket_properties | Hash | true |
To unit test the usage of this resource you can use config_bitbucket
matcher in chefspec like:
expect(chef_run).to config_bitbucket('bitbucket').with_bitbucket_properties('setup.displayName' => 'my bitbucket')
To check the possible configurations to set in the Hash refer to Bitbucket Documentation > Administering Bitbucket Server > Bitbucket Server config properties.
At the minimum it is useful to configure the setup properties mentioned in Bitbucket Documentation > Install or upgrade Bitbucket Server > Bitbucket Server installation guide > Automated setup for Bitbucket Server.
bitbucket_service
This resource is used to create a systemd service config. It will create
, enable
and start
the service. The name of the service is set by the property product
. Below is the usage:
bitbucket_service 'bitbucket'
Below are the attributes supported by this resource:
Property | String | default | required |
---|---|---|---|
product | String | bitbucket | false |
bitbucket_user | String | atlbitbucket | false |
install_path | String | /opt/atlassian | false |
To unit test the usage of this resource you can use service_bitbucket
matcher in chefspec like:
expect(chef_run).to service_bitbucket('bitbucket')
backup_client
This resource installs bitbucket backup-client and creates the backup properties config file.
Usage :
ruby
backup_client 'bitbucket' do
backup_user 'bitbucket_backup'
backup_password 'passwd'
bitbucket_url 'http://bitbucket_url:7990'
backup_path '/tmp'
end
Below are the attributes supported by this resource:
Property | String | default | required |
---|---|---|---|
product | String | bitbucket | false |
version | String | 3.3.2 | false |
bitbucket_user | String | atlbitbucket | false |
bitbucket_group | String | atlbitbucket | false |
home_path | String | /var/atlassian/application-data/bitbucket | false |
install_path | String | /opt/atlassian | false |
bitbucket_url | String | http://127.0.0.1:7990 | false |
client_url | String | http://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket | false |
backup_path | String | true | |
backup_user | String | false | |
backup_password | String | false |
Testing
chef exec bundle install
To check rake tasks
bash
chef exec bundle exec rake --tasks
To execute lynt and unit tests
bash
chef exec bundle exec rake style
To execute Integration tests
bash
rake integration:kitchen:default-centos-73
To directly use Kitchen
bash
chef exec kitchen verify default-centos-73
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License and Author
Author: Bharath Prakash (cippy.bharath@gmail.com)
Author: Raghavendra Gona (graghav@gmail.com)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Dependent cookbooks
ark ~> 3.1.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Change Log
v0.1.7 (2017-06-25)
Implemented enhancements:
Closed issues:
- unit test changes to installation #33
- Unit test for directory idempotence in bitbucket_install resource #31
Merged pull requests:
- Unittest dir idempotence #45 (bharathcp)
- change node.set to node.default #44 (bharathcp)
- Backup Client Resource #43 (dotIN)
- Unittest #41 (bharathcp)
v0.1.6 (2017-06-11)
Fixed bugs:
Closed issues:
- Allow JVM_SUPPORT_RECOMMENDED_ARGS to be set #39
- wrapper cookbooks cannot find the erb template sources #36
- automated generation of changelog #35
- unit test version validation #34
- unit test default value of checksum #32
Merged pull requests:
v0.1.5 (2017-06-05)
Merged pull requests:
v0.1.4 (2017-05-31)
Implemented enhancements:
- Add Guards in Custom Resource #19
- Bitbucket changes should notify #17
- Expose ChefSpec Matchers in Library #11
Fixed bugs:
- Update Readme #12
Closed issues:
- Decide on License to use #13
Merged pull requests:
- added change log #30 (bharathcp)
- fixes #17 added notify instructions on change #29 (bharathcp)
- chef spec for custom_resources #28 (bharathcp)
- fix Idempotence for config resource #27 (bharathcp)
- corrected the badge img #25 (bharathcp)
- moved matchers to libraries #24 (bharathcp)
v0.1.3 (2017-05-24)
v0.1.2 (2017-05-24)
v0.1.1 (2017-05-24)
v0.1.0 (2017-05-24)
Merged pull requests:
- review the bitbucket_install #22 (bharathcp)
- added maintainer email and removed jenkinsfile #21 (bharathcp)
- unit tests #8 (bharathcp)
- added cookstyle and fixed the rubocop errors #7 (bharathcp)
- Adding travis-ci build status #6 (dotIN)
- added food critic #5 (bharathcp)
- Added Jenkinsfile #4 (dotIN)
- added configure bitbucket resource and integ tests for the custom resource #3 (bharathcp)
- Refactor 101 #2 (bharathcp)
- git version to 2.8.1 #1 (bharathcp)
* This Change Log was automatically generated by github_changelog_generator
Collaborator Number Metric
0.1.7 failed this metric
Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.1.7 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
License Metric
0.1.7 passed this metric
Testing File Metric
0.1.7 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.7 passed this metric
0.1.7 failed this metric
0.1.7 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
License Metric
0.1.7 passed this metric
Testing File Metric
0.1.7 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.7 passed this metric
0.1.7 passed this metric
0.1.7 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.7 passed this metric
0.1.7 passed this metric