Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hop3: Simplifying Cloud and Self-Hosting for De...

Hop3: Simplifying Cloud and Self-Hosting for Developers and SMEs

The Hop3 project, recently unveiled by Abilian, addresses the dual demand of leveraging open-source software’s potential while catering to the specific needs of individual developers and small to medium-sized enterprises (SMEs). Hop3 streamlines the deployment, integration, and maintenance of a diverse array of open-source applications, spanning development, communication, collaboration, management, and marketing solutions. This open-source PaaS adheres to the “12-Factor App” methodology, ensuring scalable, secure, and sustainable application deployment. With deterministic builds, enhanced cybersecurity, and a suite of pre-packaged F/OSS applications, Hop3 offers a resilient alternative to proprietary cloud services, fostering digital autonomy and innovation. This presentation will explore the journey, architecture, and future of Hop3, highlighting its impact on both internal operational excellence and client-facing SaaS offerings.

Stefane Fermigier

December 05, 2024
Tweet

More Decks by Stefane Fermigier

Other Decks in Technology

Transcript

  1. But… - Problems with Self-Hosting • The “Linux Distribution” model

    invented by Slackware, Red Hat, SuSE and Debian in the 90s has been highly successful for infrastructure services and desktop applications, but has not been extended successfully to Web applications • Installing and maintaining Web applications on top of a Linux distribution can quickly become a time-consuming and operationally risky activity • There must be a better way…
  2. Introducing Hop3 “Hop3 is an open-source orchestration platform (PaaS) designed

    to simplify the deployment and management of distributed applications across cloud and edge environments. With a focus on fl exibility, security, resilience, and ease of use, Hop3 empowers developers and small organisations to take full control of their IT infrastructure and data, ensuring digital sovereignty and avoiding vendor lock-in. “
  3. What’s a PaaS? According to NIST, a PaaS is a

    system with "the capability to deploy onto the cloud infrastructure consumer-created or acquired applications created using programming languages, libraries, services, and tools supported by the provider. The consumer does not manage or control the underlying cloud infrastructure including network, servers, operating systems, or storage, but has control over the deployed applications and possibly con fi guration settings for the application-hosting environment.” https://csrc.nist.gov/glossary/term/platform_as_a_service
  4. The 12-Factor App methodology (2011) 1. Codebase: A single codebase

    tracked in version control, deployed to many environments. 2. Dependencies: Explicitly declare and isolate dependencies. 3. Con fi g: Store con fi guration in the environment, not in the code. 4. Backing Services: Treat backing services (e.g., databases) as attached resources. 5. Build, Release, Run: Strictly separate build and run stages. 6. Processes: Execute the app as one or more stateless processes. 7. Port Binding: Export services via port binding. 8. Concurrency: Scale out via the process model. 9. Disposability: Maximize robustness with fast startup and graceful shutdown. 10.Dev/Prod Parity: Keep development, staging, and production as similar as possible. 11.Logs: Treat logs as event streams. 12.Admin Processes: Run administrative/ management tasks as one-o ff processes. https://lab.abilian.com/Tech/Cloud/The%2012%20Factor%20App/
  5. Extended Factors for Modern Applications • Security: Integrate security at

    every stage of the application lifecycle. • Observability: Ensure robust monitoring, tracing, and logging for insights into application behavior. • Scalability: Design for horizontal scaling across distributed systems. • Resilience: Build fault-tolerant applications with automated recovery mechanisms. • Automation: Leverage automation for deployment, scaling, and maintenance tasks. • Portability: Maintain compatibility across multiple environments and cloud providers. • Compliance: Adhere to legal, regulatory, and industry-speci fi c standards. • Energy E ff i ciency: Optimize resource usage to reduce environmental impact. • Interoperability: Enable seamless integration with external systems and APIs. • Decentralization: Support distributed and/or decentralised (e.g. ActivityPub…) architectures for enhanced sovereignty and control. https://lab.abilian.com/Tech/Cloud/The%2012%20Factor%20App/
  6. PaaS Platforms Overview • Cloud-Based (Proprietary) PaaS Platforms • Platforms

    that o ff er managed services for deployment, scaling, and application lifecycle management with strong alignment to the 12-factor methodology. Examples: • Heroku, Google App Engine, AWS Elastic Beanstalk, Microsoft Azure App Service, IBM Cloud Foundry, Platform.sh, DigitalOcean App Platform, Clever Cloud, Railway, Fly.io, Convox, Deta, Appliku, Porter… • Enterprise Open Source PaaS Platforms • Designed for enterprise-grade scalability, advanced orchestration, and security, often (but not always) on top of Kubernetes. Examples: • OpenShift, Cloud Foundry, SlapOS, Tsuru, Flynn (unmaintained)… • Lightweight Open Source PaaS and Self-Hosting Platforms • Solutions for deploying and managing applications on private, usually small, infrastructure, o ff ering fl exibility and control. Examples: • Dokku, Piku, Nua, Hop3, Sailor, CapRover, YunoHost, Cloudron, Sandstorm…
  7. Self-Hosted PaaS, an Oxymoron? NO: Self-hosted PaaS combines the abstraction

    and simplicity of PaaS with the control and sovereignty of self-managed infrastructure (including IaaS). • De fi ned by Functionality: Provides tools for deploying and managing applications, whether on-premises or atop IaaS platforms. • Sovereignty and Compliance: Enables full control over infrastructure, meeting regulatory and security needs. • Avoiding Vendor Lock-In: O ff ers independence from proprietary ecosystems, ensuring fl exibility and customization. • Adaptable Use Cases: Supports diverse environments, including on-premises, hybrid cloud, and edge computing, leveraging IaaS abstractions like Compute and Storage where appropriate.
  8. 🦠 Threat Model ✓The user controls both the platform and

    the applications running on it ✓The hosting environment (hardware or cloud) is assumed to be trusted ☠ Data Breaches ☠ Supply Chain Attacks ☠ Privilege Escalation ☠ Con fi guration Errors ⛨ Encryption: Data at rest and in transit protected. ⛨ Role-Based Access Control (RBAC): Enforce least privilege with fi ne- grained permissions. ⛨ Software Bill of Materials (SBOM): Trace and validate all dependencies to secure the supply chain. ⛨ Resilience: Automated backups, failover mechanisms, and real-time monitoring. ⛨ Secure Defaults: Pre-con fi gured secure settings for logging, fi rewalls, and authentication. Key Assumptions Primary Threats Mitigation Strategies
  9. Hop3 Develop & Package A methodology and technical specifications to

    define running application from a source code base Build & Test Developers tools to help app vendors and package makers easily build robust application images Secure A server platform (“orchestrator”) ensures that applications run according to the stated intent Run Backups & Disaster Recovery, Firewall, WAF, IDS, extra authentication, RBAC… Monitoring & Governance Tools to monitor system performance and resources consumption + alerts + dashboards Deploy “One click” or one-line CLI deployment of applications, according to use cases relevant to each target use group
  10. Use Cases • SDOs (Software Developing Organisations): Streamline deployment work

    fl ows with GitOps and CI/CD, enabling e ffi cient application lifecycle management and simpli fi ed infrastructure control. • SMEs: Reduce IT costs and maintain sovereignty by hosting essential applications (Digital Workspaces, CRMs, ERPs or e-commerce…), on a user-friendly, self-managed cloud platform. • R&D Collaboration: Hop3 provides an open, extensible platform with a modular architecture and plug-in system, making it ideal for collaborative experimentation with and advancing new approaches in cloud computing (orchestration, resource optimization, edge integration….).
  11. Hop3 vs. the World • Sovereignty and Control: Empowers users

    with full control over IT infrastructure and data, avoiding vendor lock-in and centralized dependencies. • Lean and Lightweight: Prioritizes e ff i ciency with lightweight isolation (e.g., uWSGI) over heavy containerization or orchestration systems like Kubernetes, while planning support for OCI and Nix/Guix packages. • Flexible and Extensible: Supports diverse deployment models—multi-cloud, hybrid-cloud, on-premise, and edge—adapting to varied organizational needs without enforcing rigid orchestration frameworks. • Security by Design: Incorporates advanced practices like SBOM for secure supply chains, aligning with high-security and compliance standards. • Decentralized and Sustainable: Designed for distributed architectures, edge use cases, and energy-e ff i cient operations, making it inclusive and cost-e ff ective for small organizations and public institutions.
  12. Hop3 Lineage / Inspiration • FreedomBox (Eben Moglen, 2010): A

    Debian-based self-hosting solution for privacy-respecting applications and decentralized internet services. • YunoHost (Alexis Gavoty et Adrien Beudin, 2012): A Debian-based server OS for self-hosting web applications. • Dokku (Je ff Lindsay, 2013): A Bash-based, Docker-powered PaaS inspired by Heroku, simplifying app deployments on single servers. • Piku (Rui Carmo, 2017): A lightweight Heroku-like platform for deploying apps via git push on personal servers, using uWSGI. Hop3 reuses some code from Piku. • Nua (Abilian, 2021): A fl exible PaaS with a declarative approach to deploying and managing web applications, based on Docker. Hop3 reuses some code from Nua.
  13. Technical Challenges - Build • Simplicity • Focus on developer

    experience (DX) for faster onboarding, higher productivity and easier troubleshooting • Simple metadata format(s) - "conventions over con fi guration” • Reproductibility • Provide consistent build environments with deterministic build tools • Evolutivity • Easily support additional runtimes and tools
  14. Technical Challenges - Run • Resiliency • Provide external monitoring

    capabilities, alert on failures, and provide recovery plans • Facilitate restart and upgrade of components and apps • Check the system’s resilience using “chaos engineering” methods • Security • Produce “Minimum Viable Secure Product” and apply security best practices and norms • Restrict access by “smart” fi rewalling (WAF) and data encryption • Respect current regulations (ex: GDPR, CCPA, CRA…) and anticipate security audits or certi fi cations (ex: SOC 2, ISO 27001…)
  15. Technical Challenges - Architecture • Modular Evolution • Pluggable architecture

    to simplify integration of new features (languages, runtimes, services, etc.), enabling seamless adoption of emerging technologies like advanced orchestration or resource optimisation. • Scalability Across Domains • Design for horizontal scalability in distributed environments, with lightweight agents for multi-server deployments. • Separation of Concerns • Apply layered design principles to clearly segregate deployment logic, orchestration mechanisms, and user-facing components. • Infrastructure-Agnostic Approach • Adapt to diverse environments (e.g., bare metal, containers, VMs, or edge nodes).
  16. Non-Technical Challenges - UX • Meeting Diverse User Needs •

    Address the varying expertise levels of users, from non-technical administrators in SMEs to DevOps professionals in larger organizations, by providing adaptable work fl ows and interfaces. • Balancing Simplicity and Functionality • Strive to simplify deployment and management processes while retaining the fl exibility to support complex, multi-cloud, and hybrid environments. • User-Centricity • Provide web-based management interface with actionable, real-time insights such as workload status, health indicators, and alerts. • Introduce interactive tools for on-the- fl y scaling, backup management, and live workload migration to empower users.
  17. “Demo” (Edited for Brievity) ❯ hop … COMMANDS apps List

    apps (running or stopped). backup Run a backup for an app. config Manage app config. Type 'hop config' for help. deploy Deploy app. destroy Destroy app, remove all files. help Display help information for the Hop3 CLI. logs Tail running logs, e.g: hop-agent logs <app> [<process>]. pg Manage a PostgreSQL database. plugins List installed plugins. ps Show process count for app. redis Manage Redis commands. restart Restart an app. run Run command in the context of app, e.g.: hop run ls -- -al. sbom Generate a SBOM for an app. setup Initialize environment. start Stop an app. stop Stop an app.
  18. “Demo” (Edited for Brievity) ❯ cd projects/hop3/flask-gunicorn-pip/ ❯ ls Procfile

    app.py requirements.txt ❯ cat Procfile web: gunicorn -b 0.0.0.0:$PORT app:app ❯ git remote add hop3 [email protected]:flask ❯ git push hop3 main … ❯ hop config:set NGINX_SERVER_NAME=flask.hop.mydomain.com … ❯ open https://flask.hop-dev-big.abilian.com/
  19. “Demo” (Edited for Brievity) ❯ hop apps * flask-demo ❯

    hop stop > Stopping app 'flask-demo'... ❯ hop start -----> Picked free port: 59407 -----> nginx will look for app 'flask-demo' on 127.0.0.1:59407 -----> nginx will map app 'flask-demo' to hostname(s) ‘flask.hop.mydomain.com' -----> spawning 'flask-demo:web.1' ❯ hop sbom { "components": [ { "bom-ref": "requirements-L3", "description": "requirements line 3: Flask==3.1.0", ...
  20. 🧭 Development Roadmap Q4 ‘24 Q1 ‘25 Q2 ‘25 M0

    - Tech Preview • Minimal platform services • 5 packaged apps • Suitable for dogfooding • Goal: gather early feedback from developers M2 - Beta • Basic services, Web UI • Nix build system • 10 packaged apps • Static app catalog • Usable by OSS enthusiasts • Goal gather feedback from early adopters M3 - V1 (MVP) • Full set of core platform services • Multiple runtime integration (Nix…) • 15 packaged apps • Usable by the initial target markets (SME, startups, etc.) • Goal: validate product/market fit S2 ‘25 2026 V1+ • Additional services (ex: DevSecOps, Multi- Hosting…) • 20+ packaged apps • Partnerships with IaaS and SaaS vendors • Goal: initial revenue creation via subscription services V2 • Enterprise features (SAML, additional DevSecOps, Kubernetes,…) • “Stacks” of apps for specific market segments • SaaS offering • Goal: expand coverage and impact
  21. Nix / NixOS Integration “The project will enhance the Hop3

    platform by integrating Nix, a powerful package manager known for its ability to create reproducible environments, to improve build-time fl exibility and ensure consistent, reliable run-time performance.” • Nix package for Hop3 • Nix builder for applications already in nix-pkgs • Nix-based alternatives to (existing) native builders or buildpacks • Benchmarks and optimization (e.g. using caching) Upcoming fi nancing: NGI0 Commons - ETA: end of 2025
  22. 🛒 Bootstrapping an App Catalog “As a test bed and

    showcase of this integration, we will package 20 diverse and impactful F/OSS applications.” • Identify the most valuable apps • Improve the testing framework • Manage upgrades, including data migrations • Basic app catalog
  23. 🛡 Security “Additionally, we will develop new resilience and cybersecurity

    features to further strengthen the platform's robustness and security.” • Security by design • Nix-based runtime, providing backing services (storage, email…) • Backups and resilience tests • Network-level fi rewall and Web Application Firewall (WAF) • Security audit
  24. • Dynamic Scaling: Use ML techniques for real-time horizontal and

    vertical scaling to adapt to changing workload demands and optimize resource utilization. • Workload Consolidation: Implement intelligent orchestration mechanisms to consolidate workloads during o ff -peak periods, reducing energy consumption and operational costs while maintaining performance. • Live Migration: Enable seamless migration of workloads across nodes to enhance service availability and resilience in hyper-distributed environments. • Orchestrator-Agnostic Integration: Support diverse orchestrators (e.g., Kubernetes, Nomad…), for compatibility with varied deployment scenarios, from edge to cloud. 🎶 Smart Orchestration Financing: TBD - ETA: end of 2025
  25. 🍀 Sustainability and Energy E ff i ciency • Predictive

    Resource Allocation: Forecast workload trends and allocate resources preemptively and re fi ne orchestration strategies based on real-time feedback. • Optimization Algorithms: Use pluggable open-source toolboxes and algorithms to balance performance, cost, and energy e ffi ciency. • Energy-Aware Placement: Optimize resource allocation to minimize energy usage and costs and favor energy-e ffi cient and renewable-powered infrastructure for deployments. Financing: TBD - ETA: end of 2025
  26. Key Takeaways • Hop3 will make self-hosting with an Open

    Source PaaS a viable option for many use cases • First (tech. preview) release at the end of December (2024) • Contributions are welcome!
  27. Hop3 and Broader Societal Impact (at EU level) • Environmental

    Sustainability: Lightweight, energy-e ff i cient platform design that reduces digital infrastructure’s ecological footprint. • Citizen Empowerment: Enhances digital inclusion and sovereignty, mitigating risks of surveillance, social media manipulation, and digital exclusion. • Economic Transformation: Supports digital transformation in alignment with European data sovereignty regulations, ensuring control over critical data. • State Resilience: Bolsters cybersecurity for strategic infrastructure, supporting democratic and sovereign digital policies.
  28. Hop3 and Cloud Governance • Centralized Dashboard: A user-friendly interface

    o ff ers centralized monitoring and management of applications, infrastructure, and resources. • Auditing and Budgeting: Hop3 will provide tools to track resource usage and costs, enabling transparency and alignment with organizational budgets. • IAM: Ensures secure access management with enterprise-grade authentication systems like LDAP and SAML. • Operations Management: Automates and streamlines operational tasks, such as scaling, backups, and updates, reducing administrative overhead. • Schedule Policies: Supports scheduling policies for automated resource provisioning, backups, and maintenance tasks. • App Catalogs: O ff ers a repository of approved tools and con fi gurations to standardize deployments across teams. • Actionable Recommendations: Provides insights and recommendations for optimizing resource usage, improving security, and enhancing performance.
  29. Credits • Photos by Nonsap Visuals, Tim Gouw and Daniel

    Gonzalez on Unsplash • Logos from: openclipart.org, etc. • The Hop3 code base contains code from Piku (by Rui Carmo) • Hop3 will be partially funded through the NGI0 Commons Fund, a fund established by NLnet with fi nancial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101135429. Additional funding is made available by the Swiss State Secretariat for Education, Research and Innovation (SERI).