{"id":18360166,"url":"https://github.com/wekan/sps","last_synced_at":"2025-10-08T14:51:36.659Z","repository":{"id":149226174,"uuid":"89704121","full_name":"wekan/sps","owner":"wekan","description":"Simple Provisioning System","archived":false,"fork":false,"pushed_at":"2025-05-13T14:35:39.000Z","size":51979,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-13T15:51:12.321Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/wekan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-28T12:29:22.000Z","updated_at":"2025-05-13T14:35:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"74a07c6e-1cae-44d5-8716-cf0b6aace3cd","html_url":"https://github.com/wekan/sps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wekan/sps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wekan%2Fsps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wekan%2Fsps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wekan%2Fsps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wekan%2Fsps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wekan","download_url":"https://codeload.github.com/wekan/sps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wekan%2Fsps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278963804,"owners_count":26076542,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-05T22:26:52.361Z","updated_at":"2025-10-08T14:51:36.653Z","avatar_url":"https://github.com/wekan.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Provisioning System\n\n---\n\nTired of maintaining installation scripts and separately a [Markdown](http://daringfireball.net/projects/markdown/) documentation (to be processed by [MkDocs](http://www.mkdocs.org/) or [Sphinx](http://www.sphinx-doc.org)? You only have a few servers and not want to bring out the [big guns](https://en.wikipedia.org/wiki/Comparison_of_open-source_configuration_management_software)?\n\nSo maybe Simple Provisioning System (SPS) is made for you : just write your markdown documentation and execute a part of it.\n\nSPS is simple because :\n\n* It's less than 200 lines of code.\n* No dependencies' hell.\n* No need to install a specific agent, just the ssh server.\n* There is only one instruction and four keywords to remember.\n* Everything else, you already know how to do it.\n\n# Requirements\n\nMust be installed : `make` and `g++` which can compile in c++11, and `ssh`\n\n# Installation\n\nJust compile to produce the `sps` binary:\n\n    make\n\n# Prepare the host\n\nThe host you want to provision must accept an ssh connexion with your gpg key :\n\n    ssh-keygen -t rsa -b 4096\n    ssh-copy-id -i ~/.ssh/id_rsa.pub root@server_to_provision\n\n# Few rules\n\n## Write your documentation in Markdown\n\n* The title level 1 mark `# Target` (at the beginning of the line) is used as a target like a target in a Makefile.\n* Only the (one or more) target enumerated on the parameters will be executed.\n* Default setting: shell commands are executed at the remote server side through the ssh command.\n* Shell commands have to be enclosed by triple backquote ``` at the beginning of the line.\n* Put the mark `* REMOTE_EXECUTION` (only that keyword) at the beginning of the line and at the previous line the shell command you want to be executed remotely (default setting)\n* Put the mark `* LOCAL_EXECUTION` (only that keyword) at the beginning of the line and at the previous line the shell command you want to be executed locally.\n* Put the following mark `* PUT` to send a local file `source` to the remote server to `target` (don't forget the back quotes) through scp.\n\n```no-highlight\n* PUT `source` `target`\n```\n\n* Put the following mark `* GET`to retrieve a remote file `source` to the local machine to `target` (don't forget the back quotes) through scp.\n\n```no-highlight\n* GET `source` `target`\n```\n\n* That's all ! Everything else will be ignored (in the same way the target you did not mention on the paramaters) : so you can add many comments without problem.\n\n## Execute\n\n```no-highlight\ncat file.md | ./sps host target [target]\n\nWith:\n  file.md    Markdown file\n  host       Hostname or ip address where to deploy\n  target     Section name in the markdown file.md \n```\n\nExample of sps cards\n--------------------\n\nTheses examples need a Debian Wheezy 64 bit for the host to provision (192.168.0.121 in our example).\n\n# Prepare the host\n\nThe host you want to provision must accept an ssh connexion with your gpg key :\n\n```bash\nssh-keygen -t rsa -b 4096\nssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.0.121\n```\n\nMkDocs\n------\n\n# Description\n\n* Generic installation of [MkDocs](http://www.mkdocs.org/) for Debian Wheezy 64 bit.\n* This card respects the [sps formalism](https://github.com/soohwa/sps) (sps card)\n\n# Install\n\n```\napt-get install python-pip python-dev\npip install mkdocs\n```\n\n# Wekan Only-For-Testing (full stack)\n\n## Description\n\n* Wekan \"The open-source web kanban.\" : [https://wekan.io/](https://wekan.io/)\n* This documentation respects the [sps formalism](https://github.com/soohwa/sps) (sps card)\n* The purpose of this sps card is only for testing wekan and is obviously not suitable for production.\n* This sps card install a full stack mongodb nodejs wekan.\n* This installation was tested on a Debian Wheezy 64 bit and [Devuan](https://devuan.org/) Jessie 64 bit inside VirtualBox (yes, the same script with the same packages for both)\n* Reference : [Wekan Install](https://github.com/soohwa/apt/blob/master/Wekan.md)\n\n## Requirements\n\n* The host to provision is a minimal installation of a Debian Wheezy 64 bit or a [Devuan](https://devuan.org/) Jessie 64 bit\n* Be sure your compiled binary sps is in the $PATH\n* You already deployed your ssh key with\n\n```bash\nssh-keygen -t rsa -b 4096\nssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.56.101\n```\n\n* Then you can install and start the full stack with :\n\n```bash\ncat README.md | sps 192.168.56.101 \"Install Wekan\"\n```\n\n# Install Wekan\n\n```bash\napt-get install apt-transport-https\n\napt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927\necho \"deb https://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 main\" \u003e /etc/apt/sources.list.d/mongodb-org-3.2.list\n\napt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv FDEB78E7\necho \"deb https://soohwa.github.io/apt/debian wheezy main\" \u003e /etc/apt/sources.list.d/wekan-oft.list\n\napt-get update\napt-get install -y wekan-oft-0\n\n```\n\n# Configuration\n\nChange the default values in the file\n\n```bash\n/etc/default/wefork-oft-0\n```\n\nAnd restart the service\n\n```bash\n/etc/init.d/wekan-oft-0 restart\n```\n\nNow you can access to wekan [http://192.168.56.101:3000/](http://192.168.56.101:3000/) if you changed ROOT_URL='http://192.168.56.101:3000' in the /etc/default/wefork-oft file.\n\n# Behind a reverse proxy\n\nYour reverse proxy must be able to manage websocket : apache 2.2 in wheezy can not so you must install nginx from wheezy-backports (only apache \u003e= 2.4 can).\n\nIf the external exposed port is 4444 and the internal port of wekan is 3000 you must set :\n\n```bash\nexport ROOT_URL='http://yourserver:4444'\nexport PORT=3000\n```\n\nIf your reverse proxy manage the SSL certificat for HTTPS, just replace http by https.\n\n```bash\nexport ROOT_URL='https://yourserver:4444'\nexport PORT=3000\n```\n\nAnd set at least but (obviously) not sufficient :\n\n```\nserver {\n\tlisten       4444;\n\tserver_name  yourserver;\n\t\n\tlocation {\n\t\tproxy_pass http://127.0.0.1:3000/;\n\t}\n}\n```\n\n## Other example\n\n* [MkDocs](https://github.com/wekan/sps/blob/master/example/docs/0/mkdocs.md)\n* [Wekan for Debian Wheezy 64 bit \u0026 Devuan Jessie 64 bit](https://github.com/wekan/sps/blob/master/example/docs/1/wekan.md)\n\n## Other example\n\n### Create a file apache.md :\n\n    # Install\n\n    * PUT `custom.list` `/etc/apt/sources.list.d/`\n\n    ```\n    apt-get update \u0026\u0026 apt-get -q -y install apache2\n    ```\n\n    # Backup Conf\n\n    ```\n    cd /etc/\n    tar cpzf /root/apache2.tar.gz apache2\n    ```\n\n    * GET `/root/apache2.tar.gz` `.`\n\n    ```\n    rm -f /root/apache2.tar.gz\n    ```\n\n    * LOCAL_EXECUTION\n\n    ```\n    date \u003e last_conf_backup\n    ```\n\n    # Remove All\n\n    ```\n    apt-get -q -y --purge autoremove apache2\n    ```\n\n### Execute\n\n    cat apache.md | ./sps 192.168.0.50 \"Install\" \"Backup Conf\"\n\n### Result\n\nOnly the section `# Install` and `# Backup Conf` will be executed, not the `# Remove All` section.\n\n# Future\n\nI think this program is simple enough to be quickly understood and modified. This program is intentionally small and will remain because it does the job for me and I will not have the time to manage any contributions.\n\nSo I encourage you to fork it and/or transpose it in other languages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwekan%2Fsps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwekan%2Fsps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwekan%2Fsps/lists"}