PolkaHub aims to create a managed container system, with one-click services for deploying and running different parachain nodes. The proposed system enables automatic updates and resource management for running nodes, additionally providing templates for launching parachains.
- Polkahub is a fast, scalable blockchain infrastructure component for Substrate parachains.
- Polkahub provides parachain developers with the ability to launch and manage network infrastructure using our command line utility and the ability to provide public node access.
- Polkahub provides developers with a unified standard for packaging and deploying applications to cloud infrastructure.
- Polkahub provides the functionality to track and control the parachain’s versions. So in the event of critical bugs arising, developers can update or roll back the version of the parachain using simple commands (via running specific commands in a command line).
- Polkahub supports Substrate node deployment to remote servers or cloud infrastructure via git.
- Polkahub infrastructure is based on Docker Container Services such as Kubernetes.
- Docker provides high-level interfaces for isolated environments within the node's execution. Easily scaled, managed and updated.
- No need to rely on DevOps and System Administration for managing parachain’s infrastructure - thanks to PolkaHub. You only need git, command line and a simple web-interface.
MacOS / Linux You can just use bash script:
$ bash <(curl http://get.polkahub.org/ -L)
This will install polkahub binary in your /usr/local/bin(MacOS) or /usr/bin(Linux) directory Then you can use it:
$ polkahub <action> [ARGS]
Or use docker image like this:
$ mkdir $HOME/.polkahub
$ docker run --rm -ti -v $HOME/.polkahub_docker:/tmp/home -e POLKAHUB_HOME=/tmp/home registry.polkahub.org/polkahub-cli:v3 <action> [ARGS]
$ polkahub auth
Email: [email protected]
Password:
Login user with email [email protected]
⠂⠂⠂
done
Use email and password created via https://polkahub.org or create new email and password via CLI (see Registration section)
$ polkahub register
Email: [email protected]
Password:
Confirm Password:
Registration new user with email [email protected]
⡀⡀⡀
done
$ polkahub create akropolisos
⠁⠁⠁
done
https -> "https://steadfast-surprise-6647-akropolisos-rpc.polkahub.tech"
ws -> "wss://steadfast-surprise-6647-akropolisos.polkahub.tech"
remote -> "https://git.polkahub.org/steadfast-surprise-6647-akropolisos.git"
Then you can add remote to your project, push it and it will automatically start CI build.
$ polkahub find akropolisos
Looking for akropolisos project
⠁⠁⠁
steadfast-surprise-6647/[email protected]
steadfast-surprise-6647/akropolisos@v1
steadfast-surprise-6647/akropolisos@v2
$ polkahub install steadfast-surprise-6647/[email protected] -a alexander
Deploying akropolisos project with version 0.8.2
⠁⠁⠁
done
https -> "https://frightened-brick-8071-alexander-rpc.polkahub.tech"
ws -> "wss://frightened-brick-8071-alexander.polkahub.tech"
- Install Rust on host, where Polkahub components will be build. Manual documentation: https://www.rust-lang.org/learn/get-started
- Buy a VPS, minimal requirements are 2CPU and 8GB RAM. The more CPU - the faster deployment of projects in Cl
- Install the Docker and the Docker Compose on host, where Polkahub components will run. Manual documentation: https://docs.docker.com/
- Install the Docker Registry. You can use public or private one from the cloud provider of your choice. Also you can set up your own one. Manual documentation: https://docs.docker.com/
- Install and configure the Kubernetes cluster. You can buy a cluster from the cloud provider of your choice or deploy your own one on your server. Manual documentation: https://kubernetes.io/docs/home/
- Sign up on https://www.cloudflare.com/ and get the token, key_auth, zone_name and zone_id to create the DNS records via https://api.cloudflare.com/
- Sign up on https://www.mailgun.com/ and get the api_key and domain_name to sending emails via https://api.mailgun.net/
- Install packages for Debian-like Linux distributives: apt-get install -y libssl-dev ca-certificates git curl
- CLI. Building manual:https://github.com/akropolisio/polkahub-cli . To change URL REST API you need to edit constants INSTALL_URL, FIND_URL, POLKAHUB_URL in /src/parsing.rs
- REST API. Building manual: https://github.com/akropolisio/polkahub-backend
- Deployer. Building manual: https://github.com/akropolisio/polkahub-deployer
- Cloudflare Manager. Building manual: https://github.com/akropolisio/cloudflare-manager
- Mailgun Sender. Building manual: https://github.com/akropolisio/mailgun-sender
- Pack the Deployer in the Docker-image. Files and environment variables descriptions are here: https://github.com/akropolisio/cloudflare-manager Push to Docker Registry, run the Deployer in Kubernetes cluster and configure the access via HTTP to the Deployer for CI.
- Pack the Cloud Manager in the Docker-image. Files and environment variables descriptions are here: https://github.com/akropolisio/cloudflare-manager. Secret Files content can be found in point 6 of Preliminary steps section. Push to Docker Registry, run the Cloudflare Manager in Kubernetes cluster and configure the access via HTTP to the Cloudflare Manager for CI.
- Pack the Mailgun Sender in the Docker-image. Files and environment variables descriptions are here: https://github.com/akropolisio/mailgun-sender. Secret Files content can be found in point 6 of Preliminary steps section. Push to Docker Registry, run the Mailgun Sender in Kubernetes cluster and configure the access via HTTP to the Mailgun Sender for REST API.
- Install Jenkins. Manual documentation: https://jenkins.io/download/. Add the access token to REST API, configure 2 jobs: build-new-version and deploy-fixed-version. You may find examples of jobs at jenkins-test.polkahub.org. Configure the access to the Docker server and Docker registry for Jenkins.
- Deploy the REST API. Environment variables descriptions are here: https://github.com/akropolisio/polkahub-backend Token and job (build-new-version) name can be found in the point 1 of “Running the components on VPS”. Configure the access via HTTP to the REST API for CLI.
- Deploy the Git server, configure the access via HTTP to the git repositories directories (e.g. via Nginx + fcgiwrap + git-http-backend)
- Deploy the PostgreSQL, configure the access for REST API
Name | Version | Purpose |
---|---|---|
cloudflare-manager | 0.1.0 | DNS management |
mailgun-sender | 0.1.0 | Email sender via Mailgun |
polkahub-backend | 0.2.0 | Manage user command execution |
polkahub-cli | 0.4.0 | Process user input and trigger api calls |
polkahub-deployer | 0.2.0 | Form docker manifest for Kubernetes API |
polkahub-installer | 0.4.0 | Shell script to install latest Polkahub CLI build |
All images available at registry.polkahub.org/<name>
:<tag>
Name | Tag | Purpose |
---|---|---|
deployer | v2 | Microservice to deploy the projects in Kubernetes |
cloudflare-manager | v1 | Microservice to create DNS-records in Cloudflare |
mailgun-sender | v1 | Email sender via Mailgun |
substrate-builder | rust-1.41-v3 | Docker-image with the environment for projects building in CI |
Name | Tag | Purpose |
---|---|---|
polkahub-backend | v3 | API image for Polkahub test launch via Docker-compose |
polkahub-git-backend | v1 | Git server image for Polkahub test launch via Docker-compose |
polkahub-jenkins | v1 | Jenkins image for Polkahub test launch via Docker-compose |
balancer | v3 | Jenkins image for Polkahub test launch via Docker-compose |
polkahub-cli | v3 | CLI image interacting with the test environment |
akropolis-akropolisos | 0.8.2 | AkropolisOS Node image |
stimulating-plant-3173-alexander | v0.4 | Polkadot-Alexander Node Image |
decisive-picture-8329-kusama | v0.7 | Kusama Node Image |
polkahub-frontend | v1 | Web portal |