Coder Social home page Coder Social logo

ovrclk / akash-mirror Goto Github PK

View Code? Open in Web Editor NEW
3.0 5.0 0.0 18 KB

A helper utility to deploy a static mirror of any website on to the Akash TestNet

License: Apache License 2.0

Makefile 2.64% Shell 97.36%
bash containers akash blockchain cloud

akash-mirror's Introduction

akash-mirror

akash-mirror is a helper utility to deploy a static mirror of any website on to the Akash TestNet.

Usage

You can deploy a static mirror of a website by running akash-mirror DOMAIN, for eg: akash-mirror gregosuri.com. The mirrored site will be deployed to the Akash TestNet and will use the tokens from your local wallet to pay. By default, it uses master key which can be changed by specifying -k KEY.

Example deployment of akash.network:

$ akash-mirror -k gosuri -u https://akash.network akash.network

==> akash-mirror: Deploying akash.network (mirror) to Akash TestNet
    akash-mirror: [mirror: begin] mirroring https://akash.network to /Users/gosuri/code/go/src/github.com/ovrclk/tools/hashed/akashnet/akash.network-mirror
    akash-mirror: [mirror: done] successfully mirrored https://akash.network -> /Users/gosuri/code/go/src/github.com/ovrclk/tools/hashed/akashnet/akash.network-mirror
    akash-mirror: [make-image: begin] building container quay.io/ovrclk/demo-akash.network
==> akash-mirror: [make-image: done] docker image quay.io/ovrclk/demo-akash.network successfully built, using:
    akash-mirror:
    akash-mirror: 	$ docker build . -t quay.io/ovrclk/demo-akash.network
    akash-mirror:
    akash-mirror: [push-image: begin] pushing quay.io/ovrclk/demo-akash.network
==> akash-mirror: [push-image: done] image pushed to remote repository quay.io/ovrclk/demo-akash.network, using:
    akash-mirror:
    akash-mirror: 	$ docker push quay.io/ovrclk/demo-akash.network
    akash-mirror:
    akash-mirror: [check-perm: begin] verify access to image (quay.io/ovrclk/demo-akash.network)
    akash-mirror: [check-perm done]: image (quay.io/ovrclk/demo-akash.network) is ready for deployment
    akash-mirror: [make-conf: begin] creating akash manifest (/Users/gosuri/code/go/src/github.com/ovrclk/tools/hashed/akashnet/akash.yml)
==> akash-mirror: [make-conf: done] successfully creating akash manifest (/Users/gosuri/code/go/src/github.com/ovrclk/tools/hashed/akashnet/akash.yml)
    akash-mirror:
    akash-mirror: 	$ cat > akash.yml <<EOF
---
services:
  web:
    image: quay.io/ovrclk/demo-akash.network
  ...
EOF
    akash-mirror:
    akash-mirror: [deployment-create: begin] deploying to akash testnet (/Users/gosuri/code/go/src/github.com/ovrclk/tools/hashed/akashnet/akash.yml)
==> akash-mirror: [deployment-create: done] deployment successful (2b77bdb00258be1eeb76ea57f1ac6d3c18baa2af43aebed2ce62e5ed706ad0c8), using:
    akash-mirror:
    akash-mirror: 	$ akash deployment create akash.yml -k gosuri -w > .akash
    akash-mirror:
    akash-mirror: [finish begin]
    akash-mirror: [finish kill container]: docker-docker
    akash-mirror: removing cache under /Users/gosuri/code/go/src/github.com/ovrclk/tools/hashed/akashnet

Deployment Successful
=====================

Endpoint:   akash.network.147-75-70-13.aksh.io
Deployment: 2b77bdb00258be1eeb76ea57f1ac6d3c18baa2af43aebed2ce62e5ed706ad0c8
Manifest:   /Users/gosuri/code/go/src/github.com/ovrclk/tools/hashed/akashnet/akash.yml
Image:      quay.io/ovrclk/demo-akash.network

Getting help

Running akash-mirror --help will display the below help:

akash-mirror 0.0.1

Usage:
  akash-mirror [options] DOMAIN

Options:
  -d DIR --dir=DIR            Stage the files in DIR. [default: .]
  -u URL --url=URL            Use URL if different from DOMAIN.
  -i IMAGE --image=image      Use IMAGE as tag for container. [default: quay.io/ovrclk/demo-DOMAIN]
  --rm=false                  Always keep the files after the run. [default: true]
  -V --verbose                Run in verbose mode.
  -h --help                   Display this help message.
  -v --version                Display the version number.

Installation

Requirements

  • Akash 0.2.2
  • HTTrack ~> 3.49-2
  • Docker ~> 18.03

For OSX (Mac)

$ brew install ovrclk/tap/akash-mirror

From source

$ git clone [email protected]:ovrclk/akash-mirror.git
$ cd akash-mirror
$ make install

akash-mirror's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.