xxh/xde
2021-03-31 13:32:45 +03:00
..
keys Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
tests Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
.gitattributes Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
.gitignore Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
docker-compose.yml Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
LICENSE Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
README.md Update README.md 2021-03-31 13:32:45 +03:00
requirements.txt Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
xde Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
xde-test-fast Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
xxh-dev-centos-k.Dockerfile Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
xxh-dev-start-entrypoint.sh Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
xxh-dev-start.Dockerfile Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
xxh-dev-start.sh Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
xxh-dev-ubuntu-k.Dockerfile Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00
xxh-dev-ubuntu-kf.Dockerfile Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde 2021-03-15 08:14:10 +03:00

Xxh Development Environment (xde)

Development and test environment for xxh/xxh contains network of docker containers which allow to test the ssh connections and xxh functionality with or without FUSE that is needed to run AppImages.

Workflow

This workflow was originally developed on ubuntu 20.04, docker 19.03.5, docker-compose 1.25.3, xonsh 0.9.14, pycharm 2019.3.3.

  1. Creating base environment and running test first time:
apt install -y docker git  # Or install docker from official repo - https://docs.docker.com/engine/install/ubuntu/
mkdir -p ~/git && cd ~/git
git clone https://github.com/xxh/xxh
cd xxh/xde
pip install -r requirements.txt
./xde build             # build docker containers
./xde up                # run docker containers
./xde test              # run tests first time
  1. Open ~/git/xxh in your IDE to make changes and commit.
  2. Now you can go to start host and try your first connect using xxh:
./xde goto start

# Press UP key to get connection strings to other hosts from bash history.
# Here xxh will be from /xxh/xxh/ that is your local  directory
#root@start> 
xxh -i ~/id_rsa root@ubuntu_k

#root@start> #Try from another shell:
su uzsh
#uzsh@start> 
xxh +I xxh-plugin-zsh-ohmyzsh
#uzsh@start> 
xxh -i ~/id_rsa root@ubuntu_k
#root@ubuntu_k% 
echo $ZSH_THEME && exit
#agnoster
#uzsh@start> 
source xxh.zsh -i ~/id_rsa root@ubuntu_k
#root@ubuntu_k% 
echo $ZSH_THEME
#bira
  1. Change the code in IDE and run xxh on start container. It's so easy!
  2. Run tests ./xde t (don't forget about ./xde t --help and fast mode ./xde t -sr)
  3. After end of work you can ./xde stop or ./xde remove the containers.
  4. You rock! Try to find easter egg in the xxh code now.

Docker containers in the network

Hostname Auth FUSE rsync users
start ./xde g start root, uxonsh, uzsh, ufish, ubash
ubuntu_k key root
ubuntu_kf key yes yes root
centos_k key root
arch_p password root, docker

Every container has /xxh it is the volume. For example if you'll add a file to tests/new.xsh it appears on all hosts immediately in /xxh/xde/tests/new.xsh.

xxh development environment tool

./xde -h
#usage: xde <command>
#
#xxh development environment commands:
#
#   clone       Git clone repos from https://github.com/xxh
#   build       Build the docker containers and get the xxh code if ./xxh is not exists
#   up          Docker-compose up the containers
#   test    t   Run tests
#   goto    g   Open bash by the container name part
#   start       Docker-compose start the containers
#   stop        Docker-compose stop the containers
#   remove      Docker-compose remove the containers
#   
#Try `./xde <command> --help` to get more info.   
#   
#positional arguments:
#  command     Command to run
#
#optional arguments:
#  -h, --help  show this help message and exit