Skip to content

Ansible Playbook for Ordinals Full Node Build - Linux and Ubuntu

License

Notifications You must be signed in to change notification settings

BitKind/ordinals-fullnode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ordinals-fullnode

Ansible Playbook for Ordinals Full Node Build - Linux and Ubuntu The images produced do not include final /var/bitcoin/data directory setup

The playboook installs Bitcoin, Rust, and compiles https://github.com/gmart7t2/ord.git and https://github.com/casey/ord.git

Window has RPC URL issues at volume, this appears disk/rpc call timeout related, as example, Disk usage may go to 100% during index commit at 5000, take a very long time depending on disk speed and then blow out, requiring index rebuild or index recovery if using latest ord versions.

Recommendation is to either run from Windows Ubuntu, or as done here, using Ord compiled in either Casey or Greg version within the instance. The Ansible below compiles Ord in both versions, renaming Gregs versions to ordg.

For a full list of the lastet ordg options, see https://github.com/gmart7t2/ord/blob/master/src/options.rs

Example Archictures

A) Full Windows Native Full Bitcoin Node - Docker Localhost --rpc-url
Ubuntu Docker Instance - Native Ordg installed and complied
Docker --volume launched with /bitcoin and /ordinal directories configured to connect direct from Ubuntu Ord compiled version
This connects to Windows Native Bitcoin using Ubuntu native source-compiled Ord and Ordg

B) Ubuntu Native Bitcoin and compiled Ord
Docker launched with /bitcoin and /ordinal volumes
No native services outside the docker instance, native windows volumes mounted within Docker.
This is solid and removes the --rpc-url and docker host proxy, however screen or ssh should be used to Docker Attach otherwise Bitcoin needs to be launched as a job and attaching creates a single entry point with all stdout going to the active console.

Ubuntu Setup from cmd line

docker pull ubuntu:latest
docker run -idt --name ord ubuntu:latest
docker exec ord apt update -y && apt upgrade
docker exec ord apt install -y sudo
docker exec ord apt install -y python3
docker exec ord apt install -y python3-pip
docker exec ord python3 -m pip install ansible
docker cp ubuntu.yaml ord:/tmp/
docker exec ord ansible-playbook /tmp/ubuntu.yaml

Oracle Linux 8 Setup from cmd line

docker pull oraclelinux:8
docker run -itd --name ord oraclelinux:8
docker exec ord dnf update
docker exec ord dnf install -y python3.9
docker exec ord python3 -m pip install ansible
docker cp oel.yaml ord:/tmp/
docker exec ord ansible-playbook /tmp/oel.yaml

Committing image and Running with attached volume

docker ps -a | grep ord | cut -d" " -f1   #windows with cygwin or ubuntu
docker commit <containerid> ordinals:latest
# run the ordinals image with localhost access and attach to a volume, naming the volume /bitcoin
docker run -idt --network="host" --volume //z/ordinals:/ordinals --volume //z/bitcoin:/bitcoin --name ord ordinals:latest
docker attach ord
sudo su - token
# make sure Bitcoin full node is running
# this example uses Bitcoin RPC installed natively on the host machine, not the installed docker Bitcoin
ord --bitcoin-data-dir /bitcoin/data --data-dir /bitcoin/data --index /ordinals/08-index-sats.redb --index-sats --rpc-url host.docker.internal:8332/wallet/ord wallet inscriptions
image

About

Ansible Playbook for Ordinals Full Node Build - Linux and Ubuntu

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published