{"id":27923348,"url":"https://github.com/apache/incubator-resilientdb-ansible","last_synced_at":"2026-02-26T21:36:52.032Z","repository":{"id":284993747,"uuid":"932976329","full_name":"apache/incubator-resilientdb-ansible","owner":"apache","description":"Global-Scale Sustainable Blockchain Fabric https://resilientdb.incubator.apache.org/","archived":false,"fork":false,"pushed_at":"2025-12-15T01:56:59.000Z","size":59,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-12-17T18:18:47.068Z","etag":null,"topics":["blockchain","blockchain-platform","crypto","distributed-database","distributed-ledger","key-value-database","smart-contracts","solidity","utxo"],"latest_commit_sha":null,"homepage":null,"language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-14T21:52:03.000Z","updated_at":"2025-12-15T01:57:03.000Z","dependencies_parsed_at":"2025-09-23T11:15:34.198Z","dependency_job_id":null,"html_url":"https://github.com/apache/incubator-resilientdb-ansible","commit_stats":null,"previous_names":["resilientecosystem/resilientdb-ansible","apache/incubator-resilientdb-ansible"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/apache/incubator-resilientdb-ansible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-resilientdb-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-resilientdb-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-resilientdb-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-resilientdb-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/incubator-resilientdb-ansible/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-resilientdb-ansible/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29873336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T21:05:00.265Z","status":"ssl_error","status_checked_at":"2026-02-26T20:57:13.669Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["blockchain","blockchain-platform","crypto","distributed-database","distributed-ledger","key-value-database","smart-contracts","solidity","utxo"],"created_at":"2025-05-06T22:40:55.596Z","updated_at":"2026-02-26T21:36:52.024Z","avatar_url":"https://github.com/apache.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n--\u003e\n---\n\n# DEPRECATION NOTICE\n\nThis repository is deprecated.\nActive development now continues in the [ResilientDB Monorepo](https://github.com/apache/incubator-resilientdb).\n\nThe ResaultDB Ansible can be found at [ecosystem/deployment/ansible](https://github.com/apache/incubator-resilientdb/tree/master/ecosystem/deployment/ansible).\n\n---\n\n## ResilientDB-Ansible\n\nDocker image to provision and run ResilientDB along with supporting services (GraphQL, Crow HTTP server, Nginx) using systemd and Ansible.\n\n---\n\n## 📋 Prerequisites\n\nBefore you begin, ensure you have the following installed on your system:\n\n**NOTE:** This project requires Ubuntu 20.04+\n\n- **Git:** Version control system to clone repositories\n- **Docker:** For containerized deployment\n- **cURL or Wget:** For downloading scripts\n- **Bash Shell:** To run shell scripts\n\n---\n\n## 🚀 Quick Start\n\n### Build the Docker Image\n\n```bash\ndocker build -t resilientdb-ansible .\n```\n\n### Run the Container\n\n```bash\ndocker run --privileged \\\n  -v /sys/fs/cgroup:/sys/fs/cgroup:ro \\\n  -v /tmp:/tmp \\\n  -v /run:/run \\\n  -p 80:80 \\\n  -p 18000:18000 \\\n  -p 8000:8000 \\\n  resilientdb-ansible\n```\n\n---\n\n## 🔧 Alternative Installation Methods\n\n### Option 1: Interactive Shell (Recommended for Troubleshooting)\n\nIf the container exits with error code 255, use this approach:\n\n```bash\ndocker run --privileged \\\n  -v /sys/fs/cgroup:/sys/fs/cgroup:ro \\\n  -v /tmp:/tmp \\\n  -v /run:/run \\\n  -p 80:80 \\\n  -p 18000:18000 \\\n  -p 8000:8000 \\\n  -d \\\n  --name resilientdb-container \\\n  --entrypoint /bin/bash \\\n  resilientdb-ansible \\\n  -c \"while true; do sleep 30; done\"\n```\n\nThen access the container and run the manual startup script:\n\n```bash\n# Access the container\ndocker exec -it resilientdb-container /bin/bash\n\n# Run the complete startup script\ncat \u003e /opt/resilientdb-ansible/complete-startup.sh \u003c\u003c 'EOF'\n#!/bin/bash\necho \"Killing existing processes...\"\n\n# Kill all existing services using pkill\npkill -f kv_service 2\u003e/dev/null || true\npkill -f nginx 2\u003e/dev/null || true\npkill -f crow_service_main 2\u003e/dev/null || true\npkill -f crow-http 2\u003e/dev/null || true\npkill -f gunicorn 2\u003e/dev/null || true\npkill -f graphql 2\u003e/dev/null || true\n\necho \"Starting services fresh...\"\n\n# Start nginx\nnginx \u0026\necho \"Nginx started\"\n\n# Start ResilientDB KV services (nodes 1-4)\n/opt/resilientdb/bazel-bin/service/kv/kv_service /opt/resilientdb/service/tools/config/server/server.config /opt/resilientdb/service/tools/data/cert/node1.key.pri /opt/resilientdb/service/tools/data/cert/cert_1.cert \u0026\necho \"ResilientDB KV Node 1 started\"\n\n/opt/resilientdb/bazel-bin/service/kv/kv_service /opt/resilientdb/service/tools/config/server/server.config /opt/resilientdb/service/tools/data/cert/node2.key.pri /opt/resilientdb/service/tools/data/cert/cert_2.cert \u0026\necho \"ResilientDB KV Node 2 started\"\n\n/opt/resilientdb/bazel-bin/service/kv/kv_service /opt/resilientdb/service/tools/config/server/server.config /opt/resilientdb/service/tools/data/cert/node3.key.pri /opt/resilientdb/service/tools/data/cert/cert_3.cert \u0026\necho \"ResilientDB KV Node 3 started\"\n\n/opt/resilientdb/bazel-bin/service/kv/kv_service /opt/resilientdb/service/tools/config/server/server.config /opt/resilientdb/service/tools/data/cert/node4.key.pri /opt/resilientdb/service/tools/data/cert/cert_4.cert \u0026\necho \"ResilientDB KV Node 4 started\"\n\n# Start ResilientDB Client (node 5)\n/opt/resilientdb/bazel-bin/service/kv/kv_service /opt/resilientdb/service/tools/config/server/server.config /opt/resilientdb/service/tools/data/cert/node5.key.pri /opt/resilientdb/service/tools/data/cert/cert_5.cert \u0026\necho \"ResilientDB Client (Node 5) started\"\n\n# Start Crow HTTP service\ncd /opt/ResilientDB-GraphQL\n/opt/ResilientDB-GraphQL/bazel-bin/service/http_server/crow_service_main service/tools/config/interface/client.config service/http_server/server_config.config \u0026\necho \"Crow HTTP service started\"\n\n# Start GraphQL service\ncd /opt/ResilientDB-GraphQL\nexport PATH=\"/opt/ResilientDB-GraphQL/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\n/usr/bin/gunicorn -w 10 -b 0.0.0.0:8000 --pythonpath /opt/ResilientDB-GraphQL/venv/lib/python3.10/site-packages --timeout 120 app:app \u0026\necho \"GraphQL service started\"\n\necho \"All services started. Checking status...\"\nsleep 10\nps aux | grep -E \"(kv_service|nginx|crow|gunicorn)\"\n\n# Check if all required ports are listening\necho \"Checking ports...\"\nnetstat -tlnp | grep -E \":(80|8000|18000|10001|10002|10003|10004|10005)\"\n\n# Keep the script running\ntail -f /dev/null\nEOF\n\n# Make it executable and run\nchmod +x /opt/resilientdb-ansible/complete-startup.sh\n/opt/resilientdb-ansible/complete-startup.sh\n```\n\n### Option 2: Direct Ansible Playbook\n\nFor advanced users who want to run the Ansible playbook directly:\n\n```bash\n# Clone the repository\ngit clone https://github.com/apache/incubator-resilientdb-ansible.git\ncd incubator-resilientdb-ansible\n\n# Install Ansible (if not already installed)\nsudo apt update \u0026\u0026 sudo apt install ansible\n\n# Run the playbook\nansible-playbook site.yml -i inventories/production/hosts\n```\n\n---\n\n## 🏗️ Service Architecture\n\nThe deployment includes:\n\n- **ResilientDB KV Cluster**: 4 nodes (ports 10001-10004) + 1 client (port 10005)\n- **Crow HTTP Server**: REST API (port 18000)\n- **GraphQL API**: GraphQL interface (port 8000)\n- **Nginx**: Reverse proxy (port 80)\n\n---\n\n## 🔗 API Endpoints\n\n### REST API (Crow HTTP)\n- **Commit Transaction**: `POST http://localhost:18000/v1/transactions/commit`\n- **Get Transaction**: `GET http://localhost:18000/v1/transactions/{id}`\n\n### GraphQL API\n- **GraphQL Endpoint**: `http://localhost:8000/graphql`\n\n### Via Nginx Proxy\n- **REST API**: `http://localhost/crow/`\n- **GraphQL API**: `http://localhost/graphql`\n\n---\n\n##  Testing the Setup\n\n```bash\n# Test REST API\ncurl -X POST http://localhost:18000/v1/transactions/commit \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"id\": \"test\", \"value\": \"data\"}'\n\n# Test GraphQL API\ncurl -X POST http://localhost:8000/graphql \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"query\": \"{ __schema { types { name } } }\"}'\n```\n\n---\n\n##  Using Each Project After Installation\n\nOnce you've installed the selected projects, check out the Ecosystem and Application tabs for more information:\n\n- [ResilientDB](https://resilientecosystem.github.io/resilientdb-quickstart/usage/resilientdb/)\n- [Python SDK](https://resilientecosystem.github.io/resilientdb-quickstart/usage/pythonsdk/)\n- [ResDB-ORM](https://resilientecosystem.github.io/resilientdb-quickstart/usage/resdborm/)\n- [Smart-Contracts-CLI](https://resilientecosystem.github.io/resilientdb-quickstart/usage/smart-contracts-cli/)\n- [Smart-Contracts-GraphQL](https://resilientecosystem.github.io/resilientdb-quickstart/usage/smart-contracts-graphql/)\n- [ResVault](https://resilientecosystem.github.io/resilientdb-quickstart/usage/resvault/)\n\n---\n\n## 🐛 Common Issues\n\n### \"Connection refused\" errors\n- Ensure all ResilientDB services are running (including the client on port 10005)\n- Check that ports are properly exposed in Docker run command\n\n### \"Failed to connect to bus\" errors\n- This indicates systemd issues - use the manual startup script instead\n- The manual approach bypasses systemd and starts services directly\n\n### Services not responding\n- Check if all processes are running: `ps aux | grep -E \"(kv_service|nginx|crow|gunicorn)\"`\n- Verify ports are listening: `netstat -tlnp | grep -E \":(80|8000|18000|10001|10002|10003|10004|10005)\"`\n\n---\n\n## 📚 Additional Resources\n\n- **Official Repository**: [https://github.com/apache/incubator-resilientdb-ansible](https://github.com/apache/incubator-resilientdb-ansible)\n- **ResilientDB Documentation**: [https://resilientdb.incubator.apache.org/](https://resilientdb.incubator.apache.org/)\n- **Apache Incubator**: [https://incubator.apache.org/](https://incubator.apache.org/)\n\n---\n\n##  License\n\nLicensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fincubator-resilientdb-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fincubator-resilientdb-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fincubator-resilientdb-ansible/lists"}