Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Latest commit

 

History

History
64 lines (42 loc) · 1.67 KB

README.md

File metadata and controls

64 lines (42 loc) · 1.67 KB

ssh-rental-space

About

This program provides container-based SSH/SFTP rental space with a multi-tenant system.

Requirement

  • Python: 3
    • package: pyyaml
  • Docker: 17.06 or later
  • Docker-Compose: file format v2.4 supported

Usage

  1. Edit container's credential on container-credentials.csv

Example) $ vim container-credentials.csv

SSH_USER,SSH_PASSWORD,SSH_LISTEN_PORT,SERVER_NAME,CONTAINER_NAME,NETWORK_NAME,HOST_VOLUME_PATH
sshuser1,sshpass1,32201,ssh-server1,circle1,ssh-network1,/var/www/circle1
sshuser2,sshpass2,32202,ssh-server2,circle2,ssh-network2,/var/www/circle2

Note) You should not use space on csv-file.

  1. Build docker-compose.yml by use of main.py
$ python3 main.py

On error, You would like to install pyyaml packaege.

ModuleNotFoundError: No module named 'yaml'
  1. Upstart containers by generated docker-compose
$ docker-compose up -d

Architecture

Some containers are isolated by using docker's custom network. This system limits CPU/RAM/STORAGE capacity using Docker feature.