Giter Site home page Giter Site logo

k3karthic / ansible__totp-generator-ipfs Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 72 KB

Deploy TOTP Generator (totp.maverickgeek.xyz) to IPFS

Home Page: https://cloudflare-ipfs.com/ipns/k51qzi5uqu5dii8e5k7q6qpbz91or4gjluu2egnrtm6lkhb15lwok3a0ylxqf9

License: MIT License

Shell 100.00%
ansible totp authenticator tails tor ipfs oracle-cloud oracle

ansible__totp-generator-ipfs's Introduction

Ansible โ€” Deploy TOTP Generator to IPFS

This playbook creates a bash script which can,

Demo,

Assumption: The instance runs in Oracle Cloud using the Terraform script below,

bin/deploy.sh uses an Ansible ad-hoc task to run publish_totp_ipfs.sh on the instance.

Code Mirrors

Requirements

Install the following before running the playbook,

$ pip install oci
$ ansible-galaxy collection install oracle.oci

Dynamic Inventory

The Oracle Ansible Inventory Plugin populates public Ubuntu instances.

The target Ubuntu instance must have the freeform tag ipfs_service: yes.

Configuration

  1. Update inventory/oracle.oci.yml,
    1. Specify the region where you have deployed your server on Oracle Cloud. List of regions are at docs.oracle.com/en-us/iaas/Content/General/Concepts/regions.htm.
    2. Configure the authentication as per the Oracle Guide
  2. Set username and SSH authentication in inventory/group_vars/

IPNS Initialization

IPNS derives the public URL from a keypair. Follow the instructions below to create a keypair.

Create a key using the following command and note the ID in the result,

$ ipfs key gen <name>

Export the key using the following command,

$ ipfs key export <name>
  1. Save the ID and name in inventory/group_vars/tag_ipfs_service=yes.yml. Use inventory/group_vars/tag_ipfs_service=yes.yml.sample as a reference.
  2. Save the exported key in the files directory.

Deployment

Run the playbook using the following command,

$ ./bin/apply.sh

Encryption

Encrypt sensitive files (IPFS key, SSH private keys and inventory/group_vars/tag_ipfs_service=yes.yml) before saving them. .gitignore must contain the unencrypted file paths.

Use the following command to decrypt the files after cloning the repository,

$ ./bin/decrypt.sh

Use the following command after running terraform to update the encrypted files,

$ ./bin/encrypt.sh <gpg key id>

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.