2024-11-08 17:11:03 +00:00
|
|
|
<h1> Crystallib and Hero Basic Docs </h1>
|
|
|
|
|
|
|
|
<h2>Table of Contents</h2>
|
|
|
|
|
|
|
|
- [Introduction](#introduction)
|
|
|
|
- [Prerequisites](#prerequisites)
|
|
|
|
- [Deploy Webserver](#deploy-webserver)
|
|
|
|
- [Clean Up](#clean-up)
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
## Introduction
|
|
|
|
|
|
|
|
We provide the steps to prepare a Docker Ubuntu container to work with Hero and Crystallib.
|
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
|
|
|
|
- Docker
|
|
|
|
|
|
|
|
## Deploy Webserver
|
|
|
|
|
|
|
|
- Run the Ubuntu container with host networking and a specific name
|
|
|
|
```
|
2024-11-08 17:59:09 +00:00
|
|
|
sudo docker run -it --net=host --name=hero-container -v ~/code:/root/code ubuntu:latest /bin/bash
|
2024-11-08 17:11:03 +00:00
|
|
|
```
|
|
|
|
|
2024-11-17 15:45:22 +00:00
|
|
|
- If you want to set up the SSH key, do the following:
|
2024-11-17 15:44:35 +00:00
|
|
|
- Create Directory .ssh in container
|
|
|
|
```
|
|
|
|
mkdir -p ~/.ssh
|
|
|
|
```
|
|
|
|
- Copy SSH keys to container from local machine (use the proper path and key type)
|
|
|
|
```
|
|
|
|
sudo docker cp ~/.ssh/id_ed25519 hero-container:/root/.ssh/id_ed25519
|
|
|
|
sudo docker cp ~/.ssh/id_ed25519.pub hero-container:/root/.ssh/id_ed25519.pub
|
|
|
|
```
|
2024-11-08 17:11:03 +00:00
|
|
|
- Execute all commands directly in the container
|
|
|
|
|
|
|
|
```
|
|
|
|
# Install prerequisites
|
2024-11-08 17:59:09 +00:00
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
apt-get update -y
|
|
|
|
apt-get install -y git curl nano openssh-client libsqlite3-dev python3-venv
|
2024-11-08 17:11:03 +00:00
|
|
|
|
|
|
|
# Clone the repository and set up the environment
|
|
|
|
|
|
|
|
mkdir -p ~/code/github/freeflowuniverse
|
|
|
|
cd ~/code/github/freeflowuniverse
|
|
|
|
git clone https://github.com/freeflowuniverse/crystallib
|
|
|
|
cd crystallib
|
|
|
|
|
|
|
|
# Download and run installation scripts for Crystallib and Hero
|
|
|
|
|
|
|
|
curl https://raw.githubusercontent.com/freeflowuniverse/crystallib/development/scripts/install_hero.sh > /tmp/hero_install.sh
|
|
|
|
|
|
|
|
bash /tmp/hero_install.sh
|
|
|
|
|
|
|
|
curl https://raw.githubusercontent.com/freeflowuniverse/crystallib/development/scripts/installer.sh > /tmp/install.sh
|
|
|
|
|
|
|
|
bash /tmp/install.sh
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "Crystallib and Hero are set up on your Docker container."
|
|
|
|
echo
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## Clean Up
|
|
|
|
|
|
|
|
When you're done, you can clean up your environment.
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo docker stop hero-container
|
|
|
|
sudo docker rm hero-container
|
2024-11-08 17:59:09 +00:00
|
|
|
sudo find ~/code -mindepth 1 -delete
|
2024-11-08 17:11:03 +00:00
|
|
|
```
|