When managing microservices in a cloud-native world, we often default to tools like Terraform, Ansible, or Kubernetes. But what if we could do something equally powerful with something as old-school and universal as Bash?
Welcome to RoboShop Shell Automation β a complete, script-driven deployment solution for a microservices-based e-commerce application.
ποΈ What is RoboShop?
RoboShop (originally a project by DevOps enthusiasts for training and demonstrations) is a fully containerized or VM-deployable e-commerce platform built on a microservices architecture. Each service handles a business function such as:
- catalog β product listings
- user β user management
- cart β shopping cart logic
- payment β payment gateway simulation
- shipping β logistics layer
- frontend β user-facing UI
- databases β MongoDB, MySQL, Redis, RabbitMQ (for async messaging)
π§ Why Shell Scripting?
Many infra projects lean heavily on configuration management tools (Ansible, Chef, etc.), which are excellent but often overkill for small-to-mid scale dev/test environments. Definitely it's a simple and steady in learning as beginners level.
Shell scripting provides:
π Repeatability β one-click install via ./service.sh
π¦ Portability β runs on any POSIX-compliant environment
π§© Composability β scripts are modular; services can be deployed independently
π‘ Learning opportunity β teaches sysadmin basics like systemd, user creation, logs, idempotency
π¦ Repo Overview
π roboshop-shell GitHub Repo
Each script is service-specific and handles:
- Dependency installation (Node.js, Python, Java, etc.)
- App code setup from source or package repo
- Service user creation (roboshop, catalog, etc.)
- systemd unit file creation and daemon reload
- Logging into /var/log/roboshop/
π§ Example Services
common.sh # Global setups: users, utils, colors, logging
catalog.sh # Node.js-based service for product listings
cart.sh # Redis-backed cart logic
shipping.sh # Java-based microservice
payment.sh # Python-based payment gateway
mongodb.sh # Installs & configures MongoDB backend
π οΈ How to Use It
π§° Prerequisites
- CentOS 7 / RHEL 9/ Amazon Linux 2023
- Sudo privileges
- Internet access (to fetch dependencies and app artifacts)
π§ Installation Steps
1: Clone the Repo
git clone https://github.com/MannmeetOrg/roboshop-shell.git
cd roboshop-shell
2: Run the Scripts
sudo ./common.sh
sudo ./mongodb.sh
sudo ./catalog.sh
sudo ./cart.sh
β¦
sudo ./frontend.sh
3: Or Automate It All
for svc in common mongodb redis mysql rabbitmq user cart shipping payment frontend; do
sudo ./${svc}.sh || { echo "Failed on $svc"; exit 1; }
done
β What Makes This Project Robust?
π§© Idempotent Logic
Each script checks if a user exists, if services are already running, or if dependencies are installed. This prevents double provisioning or service conflicts.
π Centralized Logging
All scripts log to:
/logs/<service>.log
Helps in debugging failures post-installation.
π Secure Practices
- App users are created with no-login shells
- Systemd services run as non-root users
- Limited package exposure to only whatβs needed
π What I Learned
While building this project, I focused on:
- Mastering systemd services
- Realizing the power of Bash as an orchestration tool
- Debugging with set -e, trap, and return codes
- Emphasizing modularity so that each service is deployable in isolation
π§ Future Enhancements
βοΈ Integrate with Terraform to provision base VMs
π³ Dockerize each service and use shell to build/run containers
π Add rollback logic for failed deployments
π§ͺ Integrate with GitHub Actions or Jenkins CI
π€ Contribute
This project is ideal for DevOps learners or infra engineers who want to:
- Understand service orchestration from the ground up
- Build infra-automation projects using core tools
- Improve their shell scripting and systemd knowledge
Fork it here: https://github.com/MannmeetOrg/roboshop-shell
βοΈ Final Thoughts
Shell scripting might be βold school,β but itβs still immensely powerful β especially when layered with a clean architecture, thoughtful structure, and microservice best practices.
If youβre preparing for a DevOps role, building demo labs, or learning backend automation β RoboShop Shell Automation is a hands-on, real-world project you should try!
π Repo: MannmeetOrg/roboshop-shell
π©βπ» Author: Manmeet Kaur Ahir
π« Connect: LinkedIn
Top comments (0)