{"id":17144999,"url":"https://github.com/voxpupuli/puppet-stash","last_synced_at":"2025-04-13T09:32:03.685Z","repository":{"id":14131771,"uuid":"16837157","full_name":"voxpupuli/puppet-stash","owner":"voxpupuli","description":"A puppet module to install atlassian stash","archived":true,"fork":false,"pushed_at":"2024-11-05T10:43:38.000Z","size":547,"stargazers_count":19,"open_issues_count":12,"forks_count":35,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-04-04T16:32:12.722Z","etag":null,"topics":["centos-puppet-module","hacktoberfest","linux-puppet-module","puppet","redhat-puppet-module","ubuntu-puppet-module"],"latest_commit_sha":null,"homepage":"https://forge.puppet.com/puppet/stash","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2014-02-14T12:55:13.000Z","updated_at":"2024-11-05T10:43:52.000Z","dependencies_parsed_at":"2023-07-12T14:28:19.185Z","dependency_job_id":"c9d37c8d-de00-4f68-a54b-09f62ec2c15b","html_url":"https://github.com/voxpupuli/puppet-stash","commit_stats":{"total_commits":290,"total_committers":32,"mean_commits":9.0625,"dds":0.7206896551724138,"last_synced_commit":"27a1ae8134a1eaa96396c44135e239d9ca522736"},"previous_names":["puppet-community/puppet-stash"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-stash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-stash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-stash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-stash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-stash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248690855,"owners_count":21146218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["centos-puppet-module","hacktoberfest","linux-puppet-module","puppet","redhat-puppet-module","ubuntu-puppet-module"],"created_at":"2024-10-14T21:04:06.402Z","updated_at":"2025-04-13T09:32:03.328Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"# Stash module for Puppet\n\n[![Build Status](https://travis-ci.org/voxpupuli/puppet-stash.png?branch=master)](https://travis-ci.org/voxpupuli/puppet-stash)\n[![Code Coverage](https://coveralls.io/repos/github/voxpupuli/puppet-stash/badge.svg?branch=master)](https://coveralls.io/github/voxpupuli/puppet-stash)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/stash.svg)](https://forge.puppetlabs.com/puppet/stash)\n[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/stash.svg)](https://forge.puppetlabs.com/puppet/stash)\n[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/stash.svg)](https://forge.puppetlabs.com/puppet/stash)\n[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/stash.svg)](https://forge.puppetlabs.com/puppet/stash)\n\n**The module is deprecated, please reach out to the Vox Pupuli mailinglist at voxpupuli@groups.io if you're still using it**\n\n#### Table of Contents\n\n1. [Overview](#overview)\n1. [Module Description - What the module does and why it is useful](#module-description)\n1. [Setup - The basics of getting started with Stash](#setup)\n    * [Stash Prerequisites](#Stash-prerequisites)\n    * [What Stash affects](#what-Stash-affects)\n    * [Beginning with Stash](#beginning-with-Stash)\n    * [Upgrades](#upgrades)\n1. [Usage - Configuration options and additional functionality](#usage)\n1. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n1. [Limitations - OS compatibility, etc.](#limitations)\n1. [Development - Guide for contributing to the module](#development)\n1. [Testing - How to test the Stash module](#testing)\n1. [Contributors](#contributors)\n\n## Overview\n\nThis is a puppet module to install Atlassian Stash. On-premises source code\nmanagement for Git that's secure, fast, and enterprise grade.\n\n|Module Version   | Support Stash versions  |\n|-----------------|-------------------------|\n| 1.3.0           | 3.0.0 - 3.9.2           |\n| 2.0.0           | 3.9.2 - 4.x.x           |\n\n## Module Description\n\nThis module installs/upgrades Atlassian's Enterprise source code management tool.\nThe Stash module also manages the stash configuration files with Puppet.\n\n## Setup\n\n### Stash Prerequisites\n\n* Stash requires a Java Developers Kit (JDK) or Java Run-time Environment (JRE)\n  platform to be installed on your server's operating system. Oracle JDK / JRE\n  (formerly Sun JDK / JRE)  versions 7 and 8 and Open JDK/ JRE versions 7 and 8\n  are currently supported by Atlassian.\n\n* Stash requires a relational database to store its configuration data. This module\n  currently supports PostgreSQL 8.4 to 9.x and MySQL 5.x. We suggest using\n  puppetlabs-postgresql/puppetlabs-mysql modules to configure/manage the database.\n  The module uses PostgreSQL as a default.\n\n* Whilst not required, for production use we recommend using nginx/apache as a\n  reverse proxy to Stash. We suggest using the jfryman/nginx puppet module.\n\n### What Stash affects\n\nIf installing to an existing Stash instance, it is your responsibility to backup\nyour database. We also recommend that you backup your Stash home directory and\nthat you align your current Stash version with the version you intend to use with\npuppet Stash module.\n\nYou must have your database setup with the account user that Stash will use.\nThis can be done using the puppetlabs-postgresql and puppetlabs-mysql modules.\nThe mysql java connector can be installed using the [puppet/mysql_java_connector](https://forge.puppetlabs.com/puppet/mysql_java_connector)\nmodule.\n\nWhen using this module to upgrade Stash, please make sure you have a database/Stash\nhome backup. We plan to include a class for backing up the stash home directory\nin a future release.\n\nWhen upgrading stash from \u003c 3.8.0 to \u003e= 3.8.0 puppet will notify the stash service\nto restart for two puppet runs. This is because the stash upgrade makes file\nattribute and content changes to the stash-config.properties. See issue #74\n\n### Beginning with Stash\n\nThis puppet module will automatically download the Stash tar.gz from Atlassian and\nextracts it into /opt/stash/atlassian-stash-$version. The default Stash home is /home/stash.\n\n#### Basic examples\n\n```puppet\n  class { 'stash':\n    javahome    =\u003e '/opt/java',\n  }\n```\n\n```puppet\n  class { 'stash':\n    version        =\u003e '3.3.0',\n    javahome       =\u003e '/opt/java',\n    dburl          =\u003e 'jdbc:postgresql://stash.example.com:5433/stash',\n    dbpassword     =\u003e $stashpass,\n  }\n```\n\nSchedule a weekly git garbage collect for all repositories.\n\n```puppet\n  class { 'stash::gc': }\n```\n\nEnable external facts for stash version.\n\n```puppet\n  class { 'stash::facts': }\n```\n\nEnable a stash backup\n\n```puppet\n  class { 'stash':\n    backup_ensure          =\u003e present,\n    backupclient_version    =\u003e '1.6.0',\n    backup_home            =\u003e '/opt/stash-backup',\n    backupuser             =\u003e 'admin',\n    backuppass             =\u003e 'password',\n    backup_keep_age        =\u003e '3d',\n    backup_schedule_hour   =\u003e '5',\n    backup_schedule_minute =\u003e '0',\n  }\n```\n\n##### Upgrades\n\n###### Upgrades to Stash\n\nStash can be upgraded by incrementing this version number. This will *STOP* the\nrunning instance of Stash and attempt to upgrade. You should take caution when\ndoing large version upgrades. Always backup your database and your home directory.\nThe stash::facts class is required for upgrades.\n\n```puppet\n  class { 'stash':\n    javahome =\u003e '/opt/java',\n    version  =\u003e '3.4.0',\n  }\n  class { 'stash::facts': }\n```\n\nIf the stash service is managed outside of puppet the stop_stash paramater can\nbe used to shut down stash.\n\n```puppet\n  class { 'stash':\n    javahome   =\u003e '/opt/java',\n    version    =\u003e '3.4.0',\n    stop_stash =\u003e 'crm resource stop stash \u0026\u0026 sleep 15',\n  }\n  class { 'stash::facts': }\n```\n\n## Usage\n\nThis module also allows for direct customization of the JVM, following\n[Atlassian's recommendations](https://confluence.atlassian.com/display/JIRA/Setting+Properties+and+Options+on+Startup)\n\nThis is especially useful for setting properties such as HTTP/https proxy settings.\nSupport has also been added for reverse proxying stash via Apache or nginx.\n\n### A more complex example\n\n```puppet\n  class { 'stash':\n    version        =\u003e '2.2.0',\n    installdir     =\u003e '/opt/atlassian/atlassian-stash',\n    homedir        =\u003e '/opt/atlassian/application-data/stash-home',\n    javahome       =\u003e '/opt/java',\n    download_url    =\u003e 'http://example.co.za/pub/software/development-tools/atlassian/',\n    dburl          =\u003e 'jdbc:postgresql://dbvip.example.co.za:5433/stash',\n    dbpassword     =\u003e $stashpass,\n    service_manage =\u003e false,\n    jvm_xms        =\u003e '1G',\n    jvm_xmx        =\u003e '4G',\n    java_opts      =\u003e '-Dhttp.proxyHost=proxy.example.co.za -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.example.co.za -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=\\\"localhost|127.0.0.1|172.*.*.*|10.*.*.*|*.example.co.za\\\"',\n    proxy          =\u003e {\n      scheme       =\u003e 'https',\n      proxyName    =\u003e 'stash.example.co.za',\n      proxyPort    =\u003e '443',\n    },\n    tomcat_port    =\u003e '7991'\n  }\n  class { 'stash::facts': }\n  class { 'stash::gc': }\n```\n\n### A Hiera example\n\nThis example is used in production for 500 users in an traditional enterprise\nenvironment. Your mileage may vary. The dbpassword can be stored using eyaml\nhiera extension.\n\n```yaml\n# Stash configuration\nstash::version:        '3.4.0'\nstash::installdir:     '/opt/atlassian/atlassian-stash'\nstash::homedir:        '/opt/atlassian/application-data/stash-home'\nstash::javahome:       '/opt/java'\nstash::dburl:          'jdbc:postgresql://dbvip.example.co.za:5433/stash'\nstash::service_manage: false\nstash::download_url:    'http://example.co.za/pub/software/development-tools/atlassian'\nstash::jvm_xms:        '1G'\nstash::jvm_xmx:        '4G'\nstash::java_opts: \u003e\n  -XX:+UseLargePages\n  -Dhttp.proxyHost=proxy.example.co.za\n  -Dhttp.proxyPort=8080\n  -Dhttps.proxyHost=proxy.example.co.za\n  -Dhttps.proxyPort=8080\n  -Dhttp.nonProxyHosts=localhost\\|127.0.0.1\\|172.*.*.*\\|10.*.*.*\\|*.example.co.za\nstash::env:\n  - 'http_proxy=proxy.example.co.za:8080'\n  - 'https_proxy=proxy.example.co.za:8080'\nstash::proxy:\n  scheme:     'https'\n  proxyName:  'stash.example.co.za'\n  proxyPort:  '443'\nstash::stash_stop: '/usr/sbin crm resource stop stash'\n```\n\n## Reference\n\n### Classes\n\n#### Public Classes\n\n* `stash`: Main class, manages the installation and configuration of Stash.\n* `stash::facts`: Enable external facts for running instance of Stash. This\n  class is required to handle upgrades of Stash. As it is an external fact,\n  we chose not to enable it by default.\n* `stash::gc`: Schedule a weekly git garbage collect for all repositories\n* `stash::backup`: Schedule a backup of stash\n\n#### Private Classes\n\n* `stash::install`: Installs Stash binaries\n* `stash::config`: Modifies Stash/tomcat configuration files\n* `stash::service`: Manage the Stash service.\n\n### Parameters\n\n#### Stash parameters\n\n##### `javahome`\n\nSpecify the java home directory. No assumptions are made re the location of java\nand therefore this option is required. Default: undef\n\n##### `version`\n\nSpecifies the version of Stash to install, defaults to latest available at time\nof module upload to the forge. It is **recommended** to pin the version number\nto avoid unnecessary upgrades of Stash\n\n##### `format`\n\nThe format of the file stash will be installed from. Default: 'tar.gz'\n\n##### `installdir`\n\nThe installation directory of the stash binaries. Default: '/opt/stash'\n\n##### `homedir`\n\nThe home directory of stash. Configuration files are stored here. Default: '/home/stash'\n\n##### `manage_usr_grp`\n\nWhether or not this module will manage the stash user and group associated with\nthe install. You must either allow the module to manage both aspects or handle\nboth outside the module. Default: true\n\n##### `user`\n\nThe user that stash should run as, as well as the ownership of stash related\nfiles. Default: 'stash'\n\n##### `group`\n\nThe group that stash files should be owned by. Default: 'stash'\n\n##### `uid`\n\nSpecify a uid of the stash user. Default: undef\n\n##### `gid`\n\nSpecify a gid of the stash user: Default: undef\n\n##### `context_path`\n\nSpecify context path, defaults to ''. If modified, Once Stash has started, go to\nthe administration area and click Server Settings (under 'Settings'). Append the\nnew context path to your base URL.\n\n##### `tomcat_port`\n\nSpecify the port that you wish to run tomcat under, defaults to 7990\n\n#### database parameters\n\n##### `dbuser`\n\nThe name of the database user that stash should use. Default: 'stash'\n\n##### `dbpassword`\n\nThe database password for the database user. Default: 'password'\n\n##### `dburl`\n\nThe uri to the stash database server. Default: 'jdbc:postgresql://localhost:5432/stash'\n\n##### `dbdriver`\n\nThe driver to use to connect to the database. Default: 'org.postgresql.Driver'\n\n#### JVM Java parameters\n\n##### `jvm_xms`\n\nDefault: '256m'\n\n##### `jvm_xmx`\n\nDefault: '1024m'\n\n##### `jvm_optional`\n\nDefault: '-XX:-HeapDumpOnOutOfMemoryError'\n\n##### `jvm_support_recommended_args`\n\nDefault: ''\n\n##### `java_opts`\n\nDefault: ''\n\n#### Tomcat parameters\n\n##### `proxy`\n\nReverse https proxy configuration. See examples for more detail. Default: {}\n\n#### Miscellaneous  parameters\n\n##### `download_url`\n\nThe URL used to download the Stash installation file.\nDefaults to '\u003chttps://www.atlassian.com/software/stash/downloads/binary\u003e'\n\n##### `checksum`\n\nThe md5 checksum of the archive file. Only supported with `deploy_module =\u003e archive`.\nDefaults to 'undef'\n\n##### `service_manage`\n\nShould puppet manage this service? Default: true\n\n##### `$service_ensure`\n\nManage the stash service, defaults to 'running'\n\n##### `$service_enable`\n\nDefaults to 'true'\n\n##### `$stop_stash`\n\nIf the stash service is managed outside of puppet the stop_stash paramater can be\nused to shut down stash for upgrades. Defaults to 'service stash stop \u0026\u0026 sleep 15'\n\n##### `deploy_module`\n\nModule to use for installed stash archive fille. Supports puppet-archive and\npuppet-staging. Defaults to 'archive'. Archive supports md5 hash checking,\nStaging support s3 buckets.\n\n##### `config_properties`\n\nExtra configuration options for stash (stash-config.properties). See\n\u003chttps://confluence.atlassian.com/display/STASH/Stash+config+properties\u003e\nfor available options. Must be a hash, Default: {}\n\n#### Backup parameters\n\n##### `backup_ensure`\n\nEnable or disable the backup cron job. Defaults to present.\n\n##### `backupclient_version`\n\nThe version of the backup client to install. Defaults to '1.9.1'\n\n##### `backup_home`\n\nHome directory to use for backups. Backups are created here under /archive.\nDefaults to '/opt/stash-backup'.\n\n##### `backupuser`\n\nThe username to use to initiate the stash backup. Defaults to 'admin'\n\n##### `backuppass`\n\nThe password to use to initiate the stash backup. Defaults to 'password'\n\n##### `backup_keep_age`\n\nHow long to keep the backup archives for. You can choose seconds, minutes, hours,\ndays, or weeks by specifying the first letter of any of those words (e.g., ‘1w’).\nSpecifying 0 will remove all files.\n\n##### `backup_schedule_hour`\n\nHour schedule for when to perform backup. Defaults to '5'.\n\n##### `backup_schedule_minute`\n\nMinute schedule for when to perform backup. Defaults to '0'.\n\n## Limitations\n\n* Puppet 3.8.7+\n* Puppet Enterprise\n\nThe puppetlabs repositories can be found at:\n\u003chttp://yum.puppetlabs.com/\u003e and \u003chttp://apt.puppetlabs.com/\u003e\n\n* RedHat / CentOS 5/6/7\n* Ubuntu 12.04 / 14.04\n* Debian 7\n\nWe plan to support other Linux distributions and possibly Windows in the near future.\n\n## Development\n\nPlease feel free to raise any issues here for bug fixes. We also welcome feature\nrequests. Feel free to make a pull request for anything and we make the effort to\nreview and merge. We prefer with tests if possible.\n\n## Testing - How to test the Stash module\n\nUsing [puppetlabs_spec_helper](https://github.com/puppetlabs/puppetlabs_spec_helper).\nSimply run:\n\n```\nbundle install \u0026\u0026 bundle exec rake spec\n```\n\nto get results.\n\n```\n/usr/bin/ruby1.9.1 -S rspec spec/classes/stash_config_spec.rb spec/classes/stash_facts_spec.rb spec/classes/stash_install_spec.rb spec/classes/stash_service_spec.rb spec/classes/stash_upgrade_spec.rb --color\nldapname is deprecated and will be removed in a future version\n.......................\n\nFinished in 2.02 seconds\n23 examples, 0 failures\n```\n\nUsing [Beaker - Puppet Labs cloud enabled acceptance testing tool.](https://github.com/puppetlabs/beaker)\n\nrun (Additional yak shaving may be required):\n\n```\nBEAKER_set=ubuntu-server-12042-x64 bundle exec rake beaker\nBEAKER_set==debian-73-x64 bundle exec rake beaker\nBEAKER_set==centos-64-x64 bundle exec rake beaker\n```\n\n## Contributors\n\n* Jaco Van Tonder\n* Merritt Krakowitzer merritt@krakowitzer.com\n* Sebastian Cole\n* Geoff Williams\n* Bruce Morrison\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-stash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-stash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-stash/lists"}