mirror of
https://github.com/YunoHost-Apps/garage_ynh.git
synced 2024-09-03 18:36:32 +02:00
commit
ca2c127608
10 changed files with 110 additions and 106 deletions
42
README.md
42
README.md
|
@ -15,37 +15,35 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
## Overview
|
||||
|
||||
Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
Garage is an S3-compatible distributed object storage service designed for self-hosting at a small-to-medium scale.
|
||||
|
||||
Garage is designed for storage clusters composed of nodes running at different physical locations, in order to easily provide a storage service that replicates data at these different locations and stays available even when some servers are unreachable. Garage also focuses on being lightweight, easy to operate, and highly resilient to machine failures.
|
||||
|
||||
### Features
|
||||
|
||||
- Ut enim ad minim veniam, quis nostrud exercitation ullamco ;
|
||||
- Laboris nisi ut aliquip ex ea commodo consequat ;
|
||||
- Duis aute irure dolor in reprehenderit in voluptate ;
|
||||
- Velit esse cillum dolore eu fugiat nulla pariatur ;
|
||||
- Excepteur sint occaecat cupidatat non proident, sunt in culpa."
|
||||
- S3 API
|
||||
- Standalone/self-contained
|
||||
- Flexible topology
|
||||
- No RAFT slowing you down
|
||||
- Several replication modes
|
||||
- Web server for static websites
|
||||
- Bucket names as aliases
|
||||
- Cluster administration API
|
||||
- Metrics and traces
|
||||
- Support for changing IP addresses
|
||||
- K2V API (experimental)
|
||||
|
||||
|
||||
**Shipped version:** 0.8.0~ynh1
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||
|
||||
## Disclaimers / important information
|
||||
|
||||
* Any known limitations, constrains or stuff not working, such as (but not limited to):
|
||||
* requiring a full dedicated domain ?
|
||||
* architectures not supported ?
|
||||
* not-working single-sign on or LDAP integration ?
|
||||
* the app requires an important amount of RAM / disk / .. to install or to work properly
|
||||
* etc...
|
||||
* Limitations :
|
||||
* This application is not usable if you're not part of a cluster with minimun 3 other nodes
|
||||
|
||||
* Other infos that people should be aware of, such as:
|
||||
* any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...)
|
||||
* how to configure / administrate the application if it ain't obvious
|
||||
* upgrade process / specificities / things to be aware of ?
|
||||
* security considerations ?
|
||||
* infos you should be aware of:
|
||||
* This application provide a node that you can connect to a garage cluster. Few option are manageable by the config panel for the current node but IT DOESN'T offer simpler way to manage bucket and keys. You have to do it by command line or let an other node managing it.
|
||||
* This application consider that the weight of the node is the size reserved to garage in G
|
||||
* This application will try to create a virtual disk to ensure garage doesn't use more than allowed. If virtualisation is not available your responsible to check space used by garage.
|
||||
|
||||
## Documentation and resources
|
||||
|
||||
|
|
42
README_fr.md
42
README_fr.md
|
@ -15,37 +15,35 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
|||
|
||||
## Vue d'ensemble
|
||||
|
||||
Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
Garage is an S3-compatible distributed object storage service designed for self-hosting at a small-to-medium scale.
|
||||
|
||||
Garage is designed for storage clusters composed of nodes running at different physical locations, in order to easily provide a storage service that replicates data at these different locations and stays available even when some servers are unreachable. Garage also focuses on being lightweight, easy to operate, and highly resilient to machine failures.
|
||||
|
||||
### Features
|
||||
|
||||
- Ut enim ad minim veniam, quis nostrud exercitation ullamco ;
|
||||
- Laboris nisi ut aliquip ex ea commodo consequat ;
|
||||
- Duis aute irure dolor in reprehenderit in voluptate ;
|
||||
- Velit esse cillum dolore eu fugiat nulla pariatur ;
|
||||
- Excepteur sint occaecat cupidatat non proident, sunt in culpa."
|
||||
- S3 API
|
||||
- Standalone/self-contained
|
||||
- Flexible topology
|
||||
- No RAFT slowing you down
|
||||
- Several replication modes
|
||||
- Web server for static websites
|
||||
- Bucket names as aliases
|
||||
- Cluster administration API
|
||||
- Metrics and traces
|
||||
- Support for changing IP addresses
|
||||
- K2V API (experimental)
|
||||
|
||||
|
||||
**Version incluse :** 0.8.0~ynh1
|
||||
|
||||
## Captures d'écran
|
||||
|
||||

|
||||
|
||||
## Avertissements / informations importantes
|
||||
|
||||
* Any known limitations, constrains or stuff not working, such as (but not limited to):
|
||||
* requiring a full dedicated domain ?
|
||||
* architectures not supported ?
|
||||
* not-working single-sign on or LDAP integration ?
|
||||
* the app requires an important amount of RAM / disk / .. to install or to work properly
|
||||
* etc...
|
||||
* Limitations :
|
||||
* This application is not usable if you're not part of a cluster with minimun 3 other nodes
|
||||
|
||||
* Other infos that people should be aware of, such as:
|
||||
* any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...)
|
||||
* how to configure / administrate the application if it ain't obvious
|
||||
* upgrade process / specificities / things to be aware of ?
|
||||
* security considerations ?
|
||||
* infos you should be aware of:
|
||||
* This application provide a node that you can connect to a garage cluster. Few option are manageable by the config panel for the current node but IT DOESN'T offer simpler way to manage bucket and keys. You have to do it by command line or let an other node managing it.
|
||||
* This application consider that the weight of the node is the size reserved to garage in G
|
||||
* This application will try to create a virtual disk to ensure garage doesn't use more than allowed. If virtualisation is not available your responsible to check space used by garage.
|
||||
|
||||
## Documentations et ressources
|
||||
|
||||
|
|
|
@ -6,16 +6,19 @@
|
|||
;; Test complet
|
||||
; Manifest
|
||||
domain="domain.tld"
|
||||
path="/"
|
||||
rpc_secret=""
|
||||
bootstrap_peers=""
|
||||
weight="10"
|
||||
datadir=""
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=0
|
||||
setup_root=1
|
||||
setup_nourl=0
|
||||
setup_root=0
|
||||
setup_nourl=1
|
||||
setup_private=0
|
||||
setup_public=1
|
||||
setup_public=0
|
||||
upgrade=1
|
||||
upgrade=1 from_commit=CommitHash
|
||||
upgrade=0 from_commit=CommitHash
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
port_already_use=0
|
||||
|
@ -26,4 +29,4 @@ Notification=none
|
|||
;;; Upgrade options
|
||||
; commit=CommitHash
|
||||
name=Name and date of the commit.
|
||||
manifest_arg=domain=DOMAIN&path=PATH&is_public=1&language=fr&admin=USER&password=pass&port=666&
|
||||
manifest_arg=domain=DOMAIN&rpc_secret=RPC_SECRET&bootstrap_peers=BOOTSTRAP_PEERS&weight=WEIGHT&datadir=DATADIR
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
Garage is an S3-compatible distributed object storage service designed for self-hosting at a small-to-medium scale.
|
||||
|
||||
Garage is designed for storage clusters composed of nodes running at different physical locations, in order to easily provide a storage service that replicates data at these different locations and stays available even when some servers are unreachable. Garage also focuses on being lightweight, easy to operate, and highly resilient to machine failures.
|
||||
|
||||
### Features
|
||||
|
||||
- Ut enim ad minim veniam, quis nostrud exercitation ullamco ;
|
||||
- Laboris nisi ut aliquip ex ea commodo consequat ;
|
||||
- Duis aute irure dolor in reprehenderit in voluptate ;
|
||||
- Velit esse cillum dolore eu fugiat nulla pariatur ;
|
||||
- Excepteur sint occaecat cupidatat non proident, sunt in culpa."
|
||||
- S3 API
|
||||
- Standalone/self-contained
|
||||
- Flexible topology
|
||||
- No RAFT slowing you down
|
||||
- Several replication modes
|
||||
- Web server for static websites
|
||||
- Bucket names as aliases
|
||||
- Cluster administration API
|
||||
- Metrics and traces
|
||||
- Support for changing IP addresses
|
||||
- K2V API (experimental)
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
* Any known limitations, constrains or stuff not working, such as (but not limited to):
|
||||
* requiring a full dedicated domain ?
|
||||
* architectures not supported ?
|
||||
* not-working single-sign on or LDAP integration ?
|
||||
* the app requires an important amount of RAM / disk / .. to install or to work properly
|
||||
* etc...
|
||||
* Limitations :
|
||||
* This application is not usable if you're not part of a cluster with minimun 3 other nodes
|
||||
|
||||
* Other infos that people should be aware of, such as:
|
||||
* any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...)
|
||||
* how to configure / administrate the application if it ain't obvious
|
||||
* upgrade process / specificities / things to be aware of ?
|
||||
* security considerations ?
|
||||
* infos you should be aware of:
|
||||
* This application provide a node that you can connect to a garage cluster. Few option are manageable by the config panel for the current node but IT DOESN'T offer simpler way to manage bucket and keys. You have to do it by command line or let an other node managing it.
|
||||
* This application consider that the weight of the node is the size reserved to garage in G
|
||||
* This application will try to create a virtual disk to ensure garage doesn't use more than allowed. If virtualisation is not available your responsible to check space used by garage.
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 35 KiB |
|
@ -36,6 +36,7 @@ port_web=$(ynh_app_setting_get --app=$app --key=port_web)
|
|||
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||
bootstrap_peers=$(ynh_app_setting_get --app=$app --key=bootstrap_peers)
|
||||
|
||||
final_path=/opt/yunohost/$app
|
||||
#=================================================
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
|
|
|
@ -33,6 +33,9 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||
virtualisation=$(ynh_app_setting_get --app=$app --key=virtualisation)
|
||||
bootstrap_peers=$(ynh_app_setting_get --app=$app --key=bootstrap_peers)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
node_id=$(ynh_app_setting_get --app=$app --key=node_id)
|
||||
weight=$(ynh_app_setting_get --app=$app --key=weight)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
|
@ -142,23 +145,28 @@ yunohost service add --needs_exposed_ports $port --description="s3 storage" --lo
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
#recreate log folder
|
||||
mkdir /var/log/$app
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# RECREATE CONFIGURATION
|
||||
#=================================================
|
||||
node_id=$(ynh_app_setting_get --app=$app --key=node_id)
|
||||
weight=$(ynh_app_setting_get --app=$app --key=weight)
|
||||
|
||||
garage_command="$garage_path/garage -c $garage_path/garage.toml"
|
||||
sleep 2
|
||||
|
||||
garage_command="$final_path/garage -c $final_path/garage.toml"
|
||||
|
||||
# define node
|
||||
$garage_command layout assign $node_id -z $domain -c $weight -t $domain
|
||||
# if there is enough node, apply layout
|
||||
apply_layout "$garage_command"
|
||||
|
||||
if [ -n "$bootstrap_peers" ]
|
||||
then
|
||||
$garage_command id connect "$bootstrap_peers"
|
||||
garage_connect "$garage_command" "$bootstrap_peers"
|
||||
fi
|
||||
|
||||
init_garage "$garage_command" "$node_id" "$weight" "$domain"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -23,7 +23,15 @@ port_api=$(ynh_app_setting_get --app=$app --key=port_api)
|
|||
port_web=$(ynh_app_setting_get --app=$app --key=port_web)
|
||||
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||
bootstrap_peers=$(ynh_app_setting_get --app=$app --key=bootstrap_peers)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
virtualisation=$(ynh_app_setting_get --app=$app --key=virtualisation)
|
||||
|
||||
if [ "$virtualisation" = "true" ] ;
|
||||
then
|
||||
virt_protection=""
|
||||
else
|
||||
virt_protection="#"
|
||||
fi
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
|
@ -64,44 +72,29 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
#
|
||||
# N.B. : the followings setting migrations snippets are provided as *EXAMPLES*
|
||||
# of what you may want to do in some cases (e.g. a setting was not defined on
|
||||
# some legacy installs and you therefore want to initiaze stuff during upgrade)
|
||||
#
|
||||
|
||||
# If db_name doesn't exist, create it
|
||||
#if [ -z "$db_name" ]; then
|
||||
# db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
# ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||
#fi
|
||||
|
||||
# If final_path doesn't exist, create it
|
||||
#if [ -z "$final_path" ]; then
|
||||
# final_path=/var/www/$app
|
||||
# ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
#fi
|
||||
|
||||
### If nobody installed your app before 4.1,
|
||||
### then you may safely remove these lines
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
||||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
|
||||
if ! ynh_permission_exists --permission="admin"; then
|
||||
# Create the required permissions
|
||||
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
||||
fi
|
||||
|
||||
# Create a permission if needed
|
||||
if ! ynh_permission_exists --permission="api"; then
|
||||
ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||
|
||||
### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package.
|
||||
### Those deb packages will be installed as dependencies of this package.
|
||||
### If you're not using this helper:
|
||||
### - Remove the section "REMOVE DEPENDENCIES" in the remove script
|
||||
### - Remove the variable "pkg_dependencies" in _common.sh
|
||||
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
|
||||
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
|
||||
if [ "$virtualisation" = "true" ]
|
||||
then
|
||||
ynh_install_app_dependencies $pkg_dependencies_virtualisation
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue