s3server

s3server

Build Status

An Ansible role which installs and configures Scality's open-source Node.JS implementation of a server handling the S3 protocol

Requirements

Currently this role is developed for and tested on Debian GNU/Linux (release: jessie). It is assumed to work on other Debian distributions as well.

Ansible version compatibility:

  • 2.3.1.0 (current version in use for development of this role)
  • 2.2.3.0

Example

---

- hosts: "{{ hosts_group | default('all') }}"

  vars:
    nodejs_version: "node_4.x"
    nginx_http_params:
      - sendfile "on"
      - access_log "/var/log/nginx/access.log"
    nginx_sites:
      default:
        - listen 80
        - server_name "{{ ansible_default_ipv4.address }}"
        - |
          location / {
            client_max_body_size 2000M;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_pass http://localhost:8000;
          }
    nginx_configs:
      gzip:
        - gzip on
        - gzip_disable msie6
    s3server_credentials:
      admin:
        email: "[email protected]"
        access: "3OJA6OBHX061J3D8L5SN"
        secret: "7tE1S9wASy7mmeAQBT6j8hZ7biu3ZuW9Faia4xz9"

  roles:
    - { role: "ansible-pm2", tags: ['pm2'] }
    - { role: "ansible-role-nginx", tags: ['nginx'] }
    - { role: "{{ role_name | default('ansible-s3server') }}", tags: ['s3server'] }

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml). They're generally prefixed with s3server_ (which I deliberately leave out here for better formatting).

variable default notes
cache_valid_time 3600 Update the apt cache if its older than the set value (in seconds)
config_file /opt/s3server/config.json Absolute path to s3server's configuration file
config_opts `` Configuration hash holding s3server's configuration optons
data_path {{ s3server_git_dest }}/localData Absolute path to where data should be stored
default_release jessie The default release to install packages from
git_accept_hostkey yes Adds the hostkey for the repo url if not already added
git_dest /opt/s3server Absolute path of where the repository should be checked out to
git_repo https://github.com/scality/S3.git git, SSH, or HTTP(S) protocol address of the git repository
git_update no If no, do not retrieve new revisions from the origin repository.
git_version GA6.4.2 What version of the repository to check out
metadata_path {{ s3server_git_dest }}/localMetadata Absolute path to where metadata should be stored
node_binary /usr/bin/node Absolute path to the 'node'-binary
npm_global yes Install the node.js library globally
npm_production yes Install dependencies in production mode, excluding devDependencies
npm_state present The state of the node.js library
package_list ['s3server'] The list of packages to be installed
pm2_app_name s3server Name of s3server when being registered at pm2
pm2_binary /usr/bin/pm2 Absolute path to the 'pm2'-binary
pre_default_release {{ s3server_default_release }} The default release to install packages (pre_package_list) from
pre_package_list ['apt-transport-https','ca-certificates'] The list of prerequisite packages to be installed
repo_list[0]['repo'] {} Source string for the repositories
run_tests True If true, try to determine the installed application's functionality
s3cmd_bin /usr/bin/s3cmd Absolute path to the 's3cmd'-binary
service_name s3server Name of s3server's service
supported_distro_list ['jessie'] A list of distribution releases this role supports
update_cache yes Run the equivalent of apt-get update before the operation

Dependencies

License

MIT

Author Information

  • Patrick Ringl
About

An Ansible role which installs and configures Scality's open-source Node.JS implementation of a server handling the S3 protocol

Install
ansible-galaxy install pari-/ansible-s3server
GitHub repository
License
mit
Downloads
24
Owner
nothing in particular