Compare commits
24 Commits
7bec6a448c
...
manual
| Author | SHA1 | Date | |
|---|---|---|---|
| 1bf6aa0fdf | |||
|
|
355c8af067 | ||
|
|
9556f01d6f | ||
|
|
6f88b7a08e | ||
|
|
11a73c5692 | ||
|
|
7d1cbbcafb | ||
|
|
f6e8f90d66 | ||
|
|
c406f2afe5 | ||
|
|
b828a6e572 | ||
|
|
6abcec74f8 | ||
|
|
7559c77cae | ||
|
|
ab9b3d9904 | ||
| bd63a3d1fd | |||
|
|
8b91508f3b | ||
|
|
c8c26e3fc9 | ||
|
|
6fb53f2dd9 | ||
|
|
4b6a33b592 | ||
|
|
c67bfaa814 | ||
|
|
836fa7d785 | ||
|
|
49bb1a0edf | ||
|
|
8a06df8cd0 | ||
|
|
9f4fb533fa | ||
|
|
3b547f2192 | ||
|
|
a8c03cdfb3 |
1
.recycle/.trash/dev.bash
Executable file
1
.recycle/.trash/dev.bash
Executable file
@@ -0,0 +1 @@
|
|||||||
|
stop;c build; c push; ./compose.bash
|
||||||
23
.recycle/compose.bash
Executable file
23
.recycle/compose.bash
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
reset
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
## docker compose pull
|
||||||
|
|
||||||
|
docker compose down --remove-orphans
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
docker compose up --build -d
|
||||||
0
.recycle/d9c50f74-ecb9-44af-a84f-f1be49c905d1.devvv
Normal file
0
.recycle/d9c50f74-ecb9-44af-a84f-f1be49c905d1.devvv
Normal file
0
.recycle/readme.md
Normal file
0
.recycle/readme.md
Normal file
0
.recycle/touch
Normal file
0
.recycle/touch
Normal file
17
.recycle/yankee-gnome-fire-linux/compose.bash
Executable file
17
.recycle/yankee-gnome-fire-linux/compose.bash
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
reset
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
#set -e
|
||||||
|
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
docker compose down --remove-orphans
|
||||||
|
|
||||||
|
docker compose up -d
|
||||||
62
.recycle/yankee-gnome-fire-linux/compose.yaml
Normal file
62
.recycle/yankee-gnome-fire-linux/compose.yaml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
yankee-gnome-fire-linux:
|
||||||
|
|
||||||
|
container_name: yankee-gnome-fire-linux
|
||||||
|
|
||||||
|
image: softwareshinobi/shinobi-academy-desktop:latest
|
||||||
|
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
ports:
|
||||||
|
|
||||||
|
- "127.0.0.1:5900:5900"
|
||||||
|
|
||||||
|
- "127.0.0.1:5922:22"
|
||||||
|
|
||||||
|
- "127.0.0.1:5980:80"
|
||||||
|
|
||||||
|
hostname: yankee
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
|
||||||
|
- code:/yankee/code
|
||||||
|
|
||||||
|
- downloads:/yankee/downloads
|
||||||
|
|
||||||
|
# - code:/home/yankee/code
|
||||||
|
## - code:/root/code
|
||||||
|
|
||||||
|
environment:
|
||||||
|
|
||||||
|
TZ: America/Bogota
|
||||||
|
|
||||||
|
## USER_UID: 1000
|
||||||
|
|
||||||
|
## USER_GID: 1000
|
||||||
|
|
||||||
|
USER: yankee
|
||||||
|
|
||||||
|
PASSWORD: yankee
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
|
||||||
|
code:
|
||||||
|
|
||||||
|
driver_opts:
|
||||||
|
|
||||||
|
type: "nfs"
|
||||||
|
|
||||||
|
o: "addr=osiris.yankee.embanet.online,nolock,rw,hard,nfsvers=4"
|
||||||
|
|
||||||
|
device: ":/Code"
|
||||||
|
|
||||||
|
downloads:
|
||||||
|
|
||||||
|
driver_opts:
|
||||||
|
|
||||||
|
type: "nfs"
|
||||||
|
|
||||||
|
o: "addr=osiris.yankee.embanet.online,nolock,rw,hard,nfsvers=4"
|
||||||
|
|
||||||
|
device: ":/Downloads"
|
||||||
58
.scalingTrash/backupshit
Normal file
58
.scalingTrash/backupshit
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
log_file = "/var/log/yankee-downloader.log"
|
||||||
|
script_path = "/yankee-gnome-fire-consumer/consumer.py"
|
||||||
|
|
||||||
|
return "@@@"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import datetime
|
||||||
|
import subprocess
|
||||||
|
import socket
|
||||||
|
import os
|
||||||
|
|
||||||
|
def getMinutes():
|
||||||
|
|
||||||
|
if current_time is None:
|
||||||
|
current_time = datetime.datetime.now()
|
||||||
|
|
||||||
|
new_minute = (current_time.minute + 5) % 60 # The % operator performs the wrap-around
|
||||||
|
new_hour = current_time.hour + (current_time.minute + 5) // 60 # Integer division for hour increment
|
||||||
|
|
||||||
|
# Create a new datetime object with the updated minute and handle hour rollover
|
||||||
|
try:
|
||||||
|
new_time = current_time.replace(minute=new_minute, hour=new_hour)
|
||||||
|
except ValueError: # handles cases where the hour rollover causes day change
|
||||||
|
new_time = current_time + datetime.timedelta(minutes=5)
|
||||||
|
|
||||||
|
return new_time
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def generate_cron_entry():
|
||||||
|
|
||||||
|
"""Generates a cron entry that runs 5 minutes from now and logs server info."""
|
||||||
|
|
||||||
|
now = datetime.datetime.now()
|
||||||
|
five_minutes_from_now = now + datetime.timedelta(minutes=5)
|
||||||
|
|
||||||
|
minute = five_minutes_from_now.minute
|
||||||
|
hour = five_minutes_from_now.hour
|
||||||
|
day = five_minutes_from_now.day
|
||||||
|
month = five_minutes_from_now.month
|
||||||
|
weekday = "*" # Weekday is left as * to run every day of the week. If you need specific weekdays, change this.
|
||||||
|
|
||||||
|
# Get server IP and hostname
|
||||||
|
try:
|
||||||
|
server_ip = socket.gethostbyname(socket.gethostname())
|
||||||
|
server_hostname = socket.gethostname()
|
||||||
|
except socket.gaierror:
|
||||||
|
server_ip = "Unknown IP"
|
||||||
|
server_hostname = "Unknown Hostname"
|
||||||
|
|
||||||
|
|
||||||
|
log_file = "/var/log/yankee-downloader.log"
|
||||||
|
script_path = "/yankee-gnome-fire-consumer/consumer.py"
|
||||||
|
|
||||||
|
print("getMinutes / ",getMinutes())
|
||||||
68
.scalingTrash/compose (copy 1).template
Executable file
68
.scalingTrash/compose (copy 1).template
Executable file
@@ -0,0 +1,68 @@
|
|||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## orchestration / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################x
|
||||||
|
|
||||||
|
yankee-desktop-remix-001:
|
||||||
|
|
||||||
|
container_name: yankee-desktop-remix-001
|
||||||
|
|
||||||
|
image: softwareshinobi/yankee-desktop-remix
|
||||||
|
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
build:
|
||||||
|
|
||||||
|
context: .
|
||||||
|
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
|
||||||
|
- yankee-nfs-downloads:/root/Downloads
|
||||||
|
|
||||||
|
hostname: yankee-desktop-001
|
||||||
|
|
||||||
|
ports:
|
||||||
|
|
||||||
|
- "20022:22"
|
||||||
|
|
||||||
|
- "20080:80"
|
||||||
|
|
||||||
|
- "20090:5900"
|
||||||
|
|
||||||
|
environment:
|
||||||
|
|
||||||
|
TZ: America/Bogota
|
||||||
|
|
||||||
|
USER_UID: 1000
|
||||||
|
|
||||||
|
USER_GID: 1000
|
||||||
|
|
||||||
|
USER: root
|
||||||
|
|
||||||
|
PASSWORD: yankee
|
||||||
|
|
||||||
|
HTTP_PASSWORD: yankee
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## volumes / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################x
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
|
||||||
|
yankee-nfs-downloads:
|
||||||
|
|
||||||
|
driver_opts:
|
||||||
|
|
||||||
|
type: "nfs"
|
||||||
|
|
||||||
|
o: nfsvers=4,addr=osiris.yankee.embanet.online,nolock,hard,rw
|
||||||
|
|
||||||
|
device: ":/"
|
||||||
73
.scalingTrash/compose (copy 1).yaml
Normal file
73
.scalingTrash/compose (copy 1).yaml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## orchestration / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################001
|
||||||
|
|
||||||
|
yankee-desktop-remix-001:
|
||||||
|
container_name: yankee-desktop-remix-001
|
||||||
|
image: softwareshinobi/yankee-desktop-remix
|
||||||
|
restart: unless-stopped
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- yankee-nfs-downloads:/root/Downloads
|
||||||
|
hostname: yankee-desktop-001
|
||||||
|
ports:
|
||||||
|
- "20012:22"
|
||||||
|
- "20018:80"
|
||||||
|
- "20019:5900"
|
||||||
|
environment:
|
||||||
|
TZ: America/Bogota
|
||||||
|
USER_UID: 1000
|
||||||
|
USER_GID: 1000
|
||||||
|
USER: root
|
||||||
|
PASSWORD: yankee
|
||||||
|
HTTP_PASSWORD: yankee
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## orchestration / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################002
|
||||||
|
|
||||||
|
yankee-desktop-remix-002:
|
||||||
|
container_name: yankee-desktop-remix-002
|
||||||
|
image: softwareshinobi/yankee-desktop-remix
|
||||||
|
restart: unless-stopped
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- yankee-nfs-downloads:/root/Downloads
|
||||||
|
hostname: yankee-desktop-002
|
||||||
|
ports:
|
||||||
|
- "20022:22"
|
||||||
|
- "20028:80"
|
||||||
|
- "20029:5900"
|
||||||
|
environment:
|
||||||
|
TZ: America/Bogota
|
||||||
|
USER_UID: 1000
|
||||||
|
USER_GID: 1000
|
||||||
|
USER: root
|
||||||
|
PASSWORD: yankee
|
||||||
|
HTTP_PASSWORD: yankee
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## volumes / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
yankee-nfs-downloads:
|
||||||
|
driver_opts:
|
||||||
|
type: "nfs"
|
||||||
|
o: nfsvers=4,addr=osiris.yankee.embanet.online,nolock,hard,rw
|
||||||
|
device: ":/"
|
||||||
|
|
||||||
218
.scalingTrash/compose.yaml
Normal file
218
.scalingTrash/compose.yaml
Normal file
@@ -0,0 +1,218 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## orchestration / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################001
|
||||||
|
|
||||||
|
yankee-desktop-remix-001:
|
||||||
|
container_name: yankee-desktop-remix-001
|
||||||
|
image: softwareshinobi/yankee-desktop-remix
|
||||||
|
restart: unless-stopped
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- yankee-nfs-downloads:/root/Downloads
|
||||||
|
hostname: yankee-desktop-001
|
||||||
|
ports:
|
||||||
|
- "20012:22"
|
||||||
|
- "20018:80"
|
||||||
|
- "20019:5900"
|
||||||
|
environment:
|
||||||
|
TZ: America/Bogota
|
||||||
|
USER_UID: 1000
|
||||||
|
USER_GID: 1000
|
||||||
|
USER: root
|
||||||
|
PASSWORD: yankee
|
||||||
|
HTTP_PASSWORD: yankee
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## orchestration / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################002
|
||||||
|
|
||||||
|
yankee-desktop-remix-002:
|
||||||
|
container_name: yankee-desktop-remix-002
|
||||||
|
image: softwareshinobi/yankee-desktop-remix
|
||||||
|
restart: unless-stopped
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- yankee-nfs-downloads:/root/Downloads
|
||||||
|
hostname: yankee-desktop-002
|
||||||
|
ports:
|
||||||
|
- "20022:22"
|
||||||
|
- "20028:80"
|
||||||
|
- "20029:5900"
|
||||||
|
environment:
|
||||||
|
TZ: America/Bogota
|
||||||
|
USER_UID: 1000
|
||||||
|
USER_GID: 1000
|
||||||
|
USER: root
|
||||||
|
PASSWORD: yankee
|
||||||
|
HTTP_PASSWORD: yankee
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## orchestration / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################003
|
||||||
|
|
||||||
|
yankee-desktop-remix-003:
|
||||||
|
container_name: yankee-desktop-remix-003
|
||||||
|
image: softwareshinobi/yankee-desktop-remix
|
||||||
|
restart: unless-stopped
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- yankee-nfs-downloads:/root/Downloads
|
||||||
|
hostname: yankee-desktop-003
|
||||||
|
ports:
|
||||||
|
- "20032:22"
|
||||||
|
- "20038:80"
|
||||||
|
- "20039:5900"
|
||||||
|
environment:
|
||||||
|
TZ: America/Bogota
|
||||||
|
USER_UID: 1000
|
||||||
|
USER_GID: 1000
|
||||||
|
USER: root
|
||||||
|
PASSWORD: yankee
|
||||||
|
HTTP_PASSWORD: yankee
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## orchestration / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################004
|
||||||
|
|
||||||
|
yankee-desktop-remix-004:
|
||||||
|
container_name: yankee-desktop-remix-004
|
||||||
|
image: softwareshinobi/yankee-desktop-remix
|
||||||
|
restart: unless-stopped
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- yankee-nfs-downloads:/root/Downloads
|
||||||
|
hostname: yankee-desktop-004
|
||||||
|
ports:
|
||||||
|
- "20042:22"
|
||||||
|
- "20048:80"
|
||||||
|
- "20049:5900"
|
||||||
|
environment:
|
||||||
|
TZ: America/Bogota
|
||||||
|
USER_UID: 1000
|
||||||
|
USER_GID: 1000
|
||||||
|
USER: root
|
||||||
|
PASSWORD: yankee
|
||||||
|
HTTP_PASSWORD: yankee
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## orchestration / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################005
|
||||||
|
|
||||||
|
yankee-desktop-remix-005:
|
||||||
|
container_name: yankee-desktop-remix-005
|
||||||
|
image: softwareshinobi/yankee-desktop-remix
|
||||||
|
restart: unless-stopped
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- yankee-nfs-downloads:/root/Downloads
|
||||||
|
hostname: yankee-desktop-005
|
||||||
|
ports:
|
||||||
|
- "20052:22"
|
||||||
|
- "20058:80"
|
||||||
|
- "20059:5900"
|
||||||
|
environment:
|
||||||
|
TZ: America/Bogota
|
||||||
|
USER_UID: 1000
|
||||||
|
USER_GID: 1000
|
||||||
|
USER: root
|
||||||
|
PASSWORD: yankee
|
||||||
|
HTTP_PASSWORD: yankee
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## orchestration / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################006
|
||||||
|
|
||||||
|
yankee-desktop-remix-006:
|
||||||
|
container_name: yankee-desktop-remix-006
|
||||||
|
image: softwareshinobi/yankee-desktop-remix
|
||||||
|
restart: unless-stopped
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- yankee-nfs-downloads:/root/Downloads
|
||||||
|
hostname: yankee-desktop-006
|
||||||
|
ports:
|
||||||
|
- "20062:22"
|
||||||
|
- "20068:80"
|
||||||
|
- "20069:5900"
|
||||||
|
environment:
|
||||||
|
TZ: America/Bogota
|
||||||
|
USER_UID: 1000
|
||||||
|
USER_GID: 1000
|
||||||
|
USER: root
|
||||||
|
PASSWORD: yankee
|
||||||
|
HTTP_PASSWORD: yankee
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## orchestration / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################007
|
||||||
|
|
||||||
|
yankee-desktop-remix-007:
|
||||||
|
container_name: yankee-desktop-remix-007
|
||||||
|
image: softwareshinobi/yankee-desktop-remix
|
||||||
|
restart: unless-stopped
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- yankee-nfs-downloads:/root/Downloads
|
||||||
|
hostname: yankee-desktop-007
|
||||||
|
ports:
|
||||||
|
- "20072:22"
|
||||||
|
- "20078:80"
|
||||||
|
- "20079:5900"
|
||||||
|
environment:
|
||||||
|
TZ: America/Bogota
|
||||||
|
USER_UID: 1000
|
||||||
|
USER_GID: 1000
|
||||||
|
USER: root
|
||||||
|
PASSWORD: yankee
|
||||||
|
HTTP_PASSWORD: yankee
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## volumes / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
yankee-nfs-downloads:
|
||||||
|
driver_opts:
|
||||||
|
type: "nfs"
|
||||||
|
o: nfsvers=4,addr=osiris.yankee.embanet.online,nolock,hard,rw
|
||||||
|
device: ":/"
|
||||||
|
|
||||||
38
.scalingTrash/cronExtras2.bash
Normal file
38
.scalingTrash/cronExtras2.bash
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
function recycle{
|
||||||
|
start_hour=$(date +%H)
|
||||||
|
|
||||||
|
if (( current_minute + 5 >= 60 )); then
|
||||||
|
|
||||||
|
start_hour=$(( (start_hour + 1) % 24 )) # handle wrap-around at 24 hours
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
start_day=$(date +%d)
|
||||||
|
start_month=$(date +%m)
|
||||||
|
start_weekday=$(date +%w)
|
||||||
|
|
||||||
|
|
||||||
|
# Get external IP and hostname (using a reliable method)
|
||||||
|
|
||||||
|
external_ip=$(curl -s ifconfig.me) # Or use dig +short myip.opendns.com
|
||||||
|
|
||||||
|
hostname=$(hostname -f)
|
||||||
|
|
||||||
|
|
||||||
|
# Construct the cron command with the calculated time and logging
|
||||||
|
cron_command="$start_minute $start_hour $start_day $start_month $start_weekday python3 /yankee-gnome-fire-consumer/consumer.py >> /var/log/yankee-downloader.log 2>&1"
|
||||||
|
|
||||||
|
# Add IP and hostname to log message *before* the python script runs
|
||||||
|
log_message="Starting consumer at $(date) from $hostname ($external_ip): "
|
||||||
|
|
||||||
|
# Add the log message to the log file, then run the python script and redirect stderr
|
||||||
|
# This is done using a subshell to ensure the log message comes before the python script's output.
|
||||||
|
cron_command_with_log="echo \"$log_message\" >> /var/log/yankee-downloader.log 2>&1; $cron_command"
|
||||||
|
|
||||||
|
|
||||||
|
# Add the cron job (using crontab -l to get existing entries, adding the new one, and then setting the crontab)
|
||||||
|
(crontab -l; echo "$cron_command_with_log") | crontab -
|
||||||
|
|
||||||
|
|
||||||
|
echo "Cron job added: $cron_command_with_log"
|
||||||
6
.scalingTrash/cronfile
Normal file
6
.scalingTrash/cronfile
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
SHELL=/bin/bash
|
||||||
|
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
|
* * * * * python3 /yankee-gnome-fire-consumer/consumer.py >> /var/log/yankee-downloader.log 2>&1
|
||||||
|
|
||||||
|
* * * * * /tmp/ping2.bash >> /var/log/cron.log 2>&1
|
||||||
8
.scalingTrash/crontabX
Normal file
8
.scalingTrash/crontabX
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
SHELL=/bin/bash
|
||||||
|
|
||||||
|
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
|
57 11 * * * python3 /yankee-gnome-fire-consumer/consumer.py >> /tmp/root/Downloads/.logs/yankee-node-96.255.165.82-veneno.log 2>&1
|
||||||
|
|
||||||
|
* * * * * /tmp/ping2.bash >> /var/log/cron.log 2>&1
|
||||||
|
|
||||||
3
.scalingTrash/ping.script
Normal file
3
.scalingTrash/ping.script
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
touch /tmp/`date +%Y_%m_%d_%H_%M_%S`.dat
|
||||||
|
|
||||||
|
ls -lha /tmp/*dat
|
||||||
3
.scalingTrash/ping2.script
Normal file
3
.scalingTrash/ping2.script
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
touch /tmp/`date +%Y_%m_%d_%H_%M_%S`.22222dat
|
||||||
|
|
||||||
|
ls -lha /tmp/*dat
|
||||||
0
.scalingTrash/touch
Normal file
0
.scalingTrash/touch
Normal file
29
Dockerfile
Executable file
29
Dockerfile
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
FROM softwareshinobi/shinobi-academy-desktop AS desktopBase
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
|
COPY /provision /
|
||||||
|
|
||||||
|
#### install the NY Giants background ####
|
||||||
|
|
||||||
|
COPY /provision/media/Backgrounds/desktop.png /usr/share/lxqt/themes/light/simple_blue_widescreen.png
|
||||||
|
|
||||||
|
COPY /provision/media/Backgrounds/desktop.png /usr/local/share/doro-lxde-wallpapers/bg1.jpg
|
||||||
|
COPY /provision/media/Backgrounds/desktop.png /usr/local/share/doro-lxde-wallpapers/bg2.jpg
|
||||||
|
COPY /provision/media/Backgrounds/desktop.png /usr/local/share/doro-lxde-wallpapers/bg3.jpg
|
||||||
|
COPY /provision/media/Backgrounds/desktop.png /usr/local/share/doro-lxde-wallpapers/bg4.jpg
|
||||||
|
|
||||||
|
RUN ls -lha /
|
||||||
|
|
||||||
|
RUN ls -lha /usr/share/lxqt/themes/light/simple_blue_widescreen.png
|
||||||
|
|
||||||
|
#### install the NY Giants background ####
|
||||||
|
|
||||||
|
RUN bash installs/gnomedownloader.bash
|
||||||
|
|
||||||
|
RUN bash installs/sshserver.bash
|
||||||
|
|
||||||
|
RUN bash installs/download-code.bash
|
||||||
|
|
||||||
54
Jenkinsfile
vendored
Executable file
54
Jenkinsfile
vendored
Executable file
@@ -0,0 +1,54 @@
|
|||||||
|
pipeline {
|
||||||
|
|
||||||
|
agent none
|
||||||
|
|
||||||
|
options {
|
||||||
|
|
||||||
|
disableConcurrentBuilds(abortPrevious: true)
|
||||||
|
|
||||||
|
buildDiscarder(logRotator(numToKeepStr: '10'))
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('docker compose build') {
|
||||||
|
|
||||||
|
agent {
|
||||||
|
|
||||||
|
label "huracan"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
|
||||||
|
dir('.') {
|
||||||
|
|
||||||
|
sh 'docker compose build'
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('docker compose push') {
|
||||||
|
|
||||||
|
agent {
|
||||||
|
|
||||||
|
label "huracan"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
|
||||||
|
dir('.') {
|
||||||
|
|
||||||
|
sh 'docker compose push'
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}}
|
||||||
19
compose.bash
Executable file
19
compose.bash
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
reset
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
docker compose down --remove-orphans
|
||||||
|
|
||||||
|
docker compose up -d
|
||||||
68
compose.yaml
Normal file
68
compose.yaml
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## orchestration / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################x
|
||||||
|
|
||||||
|
yankee-downloader-desktop-manual:
|
||||||
|
|
||||||
|
container_name: yankee-downloader-desktop-manual
|
||||||
|
|
||||||
|
image: softwareshinobi/yankee-downloader-desktop:manual
|
||||||
|
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
build:
|
||||||
|
|
||||||
|
context: .
|
||||||
|
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
|
||||||
|
- yankee-downloader-nfs-downloads:/home/yankee/Downloads
|
||||||
|
|
||||||
|
hostname: yankeedesktop
|
||||||
|
|
||||||
|
ports:
|
||||||
|
|
||||||
|
- "23022:22"
|
||||||
|
|
||||||
|
- "23080:80"
|
||||||
|
|
||||||
|
- "23900:5900"
|
||||||
|
|
||||||
|
environment:
|
||||||
|
|
||||||
|
TZ: America/New_York
|
||||||
|
|
||||||
|
USER_UID: 1000
|
||||||
|
|
||||||
|
USER_GID: 1000
|
||||||
|
|
||||||
|
USER: yankee
|
||||||
|
|
||||||
|
PASSWORD: yankee
|
||||||
|
|
||||||
|
HTTP_PASSWORD: yankee
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## volumes / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################x
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
|
||||||
|
yankee-downloader-nfs-downloads:
|
||||||
|
|
||||||
|
driver_opts:
|
||||||
|
|
||||||
|
type: "nfs"
|
||||||
|
|
||||||
|
o: nfsvers=4,addr=osiris.yankee.embanet.online,nolock,hard,rw
|
||||||
|
|
||||||
|
device: ":/"
|
||||||
36
provision/installs/.old/docker.bash
Executable file
36
provision/installs/.old/docker.bash
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo apt update;
|
||||||
|
|
||||||
|
sudo apt -y install ca-certificates curl;
|
||||||
|
|
||||||
|
## aptitude package dependency setup
|
||||||
|
|
||||||
|
sudo install -m 0755 -d /etc/apt/keyrings
|
||||||
|
|
||||||
|
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
||||||
|
|
||||||
|
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
||||||
|
|
||||||
|
echo \
|
||||||
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
||||||
|
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||||
|
tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
|
||||||
|
## docker compose install
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
|
||||||
|
sudo apt purge -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose docker docker.io
|
||||||
|
|
||||||
|
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||||
|
|
||||||
|
## run the sample container
|
||||||
|
|
||||||
|
reset;clear;
|
||||||
|
|
||||||
|
sudo docker run hello-world
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "finished installing docker compose."
|
||||||
|
echo
|
||||||
17
provision/installs/.old/hostname.bash
Executable file
17
provision/installs/.old/hostname.bash
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
set -e;
|
||||||
|
|
||||||
|
set -x;
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
cat /etc/issue;
|
||||||
|
|
||||||
|
echo "Shinobi OS Sian 20.04" > /etc/issue;
|
||||||
|
|
||||||
|
cat /etc/issue;
|
||||||
|
|
||||||
|
##
|
||||||
24
provision/installs/.old/network.bash
Executable file
24
provision/installs/.old/network.bash
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
## This script installs stuff
|
||||||
|
## to set up a linux server
|
||||||
|
## suitable for newbies.
|
||||||
|
##
|
||||||
|
## This linux server will be hosted under
|
||||||
|
## linux.softwareshinobi.digital
|
||||||
|
##
|
||||||
|
## Before you go, check read around my blog!
|
||||||
|
##
|
||||||
|
## https://www.softwareshinobi.digital
|
||||||
|
##
|
||||||
|
|
||||||
|
|
||||||
|
## Install more software
|
||||||
|
|
||||||
|
apt-get install -y wget net-tools curl nslookup
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
echo "fin."
|
||||||
13
provision/installs/.old/recycle/media.bash
Executable file
13
provision/installs/.old/recycle/media.bash
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
outputDIR=/tmp/media/backgrounds/
|
||||||
|
|
||||||
|
outputCNT=4
|
||||||
|
|
||||||
|
ls -lha /
|
||||||
|
|
||||||
|
pwd
|
||||||
|
|
||||||
|
cp /provision/media/Backgrounds/desktop.png /usr/share/lxqt/themes/light/simple_blue_widescreen.png
|
||||||
|
|
||||||
37
provision/installs/.old/recycle/netbeans.bash
Executable file
37
provision/installs/.old/recycle/netbeans.bash
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
##
|
||||||
|
## create the apps dir and populate with unzipped netbeans content
|
||||||
|
##
|
||||||
|
|
||||||
|
ls
|
||||||
|
|
||||||
|
mkdir /apps
|
||||||
|
|
||||||
|
cd /apps
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
ls
|
||||||
|
|
||||||
|
wget https://dlcdn.apache.org/netbeans/netbeans/21/netbeans-21-bin.zip
|
||||||
|
|
||||||
|
ls
|
||||||
|
|
||||||
|
mv netbeans-21-bin.zip netbeans.zip
|
||||||
|
|
||||||
|
ls
|
||||||
|
|
||||||
|
unzip netbeans.zip
|
||||||
|
|
||||||
|
ls
|
||||||
|
|
||||||
|
pwd
|
||||||
|
|
||||||
|
##
|
||||||
|
##
|
||||||
|
##
|
||||||
14
provision/installs/.old/software.bash
Executable file
14
provision/installs/.old/software.bash
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
set -e;
|
||||||
|
|
||||||
|
set -x;
|
||||||
|
|
||||||
|
##
|
||||||
|
sudo apt update
|
||||||
|
|
||||||
|
sudo apt install -y recordmydesktop kdenlive shotcut zip keepassx mpv dos2unix git filezilla openjdk-17-jdk maven remmina thunderbird openssh-server sudo vim sshpass
|
||||||
|
|
||||||
|
##
|
||||||
42
provision/installs/download-code.bash
Normal file
42
provision/installs/download-code.bash
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
echo "##"
|
||||||
|
echo "## launch > yankee > download consumer code"
|
||||||
|
echo "##"
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
cd /
|
||||||
|
|
||||||
|
rm -rf /yankee-consumer
|
||||||
|
|
||||||
|
rm -rf /yankee-gnome-fire-consumer
|
||||||
|
|
||||||
|
git clone https://code.softwareshinobi.com/yankee/yankee-gnome-fire-consumer.git yankee-consumer
|
||||||
|
|
||||||
|
cd yankee-consumer
|
||||||
|
|
||||||
|
chmod +x *.bash
|
||||||
|
|
||||||
|
ls -lha
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
cd /
|
||||||
|
|
||||||
|
rm -rf /yankee-publisher
|
||||||
|
|
||||||
|
rm -rf /yankee-gnome-fire-publisher
|
||||||
|
|
||||||
|
git clone https://code.softwareshinobi.com/yankee/yankee-gnome-fire-publisher.git yankee-publisher
|
||||||
|
|
||||||
|
cd yankee-publisher
|
||||||
|
|
||||||
|
chmod +x *.bash
|
||||||
|
|
||||||
|
ls -lha
|
||||||
|
|
||||||
|
##
|
||||||
19
provision/installs/gnomedownloader.bash
Executable file
19
provision/installs/gnomedownloader.bash
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "##"
|
||||||
|
echo "## launch > yankee > downloader node provision"
|
||||||
|
echo "##"
|
||||||
|
|
||||||
|
apt update
|
||||||
|
|
||||||
|
sudo apt install git -y
|
||||||
|
|
||||||
|
sudo apt install pip -y
|
||||||
|
|
||||||
|
pip install stomp.py
|
||||||
|
|
||||||
|
pip install selenium
|
||||||
|
|
||||||
|
pip install requests
|
||||||
|
|
||||||
|
pip install netifaces
|
||||||
13
provision/installs/sshserver.bash
Executable file
13
provision/installs/sshserver.bash
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
apt update;
|
||||||
|
|
||||||
|
apt install -y openssh-server;
|
||||||
|
|
||||||
|
apt install -y sudo;
|
||||||
|
|
||||||
|
service ssh restart;
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
echo "fin."
|
||||||
BIN
provision/media/Backgrounds/desktop.png
Normal file
BIN
provision/media/Backgrounds/desktop.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 196 KiB |
BIN
provision/media/Backgrounds/valorantsoftware.png
Executable file
BIN
provision/media/Backgrounds/valorantsoftware.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 MiB |
126
provision/startup/startup.sh
Executable file
126
provision/startup/startup.sh
Executable file
@@ -0,0 +1,126 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -n "$VNC_PASSWORD" ]; then
|
||||||
|
echo -n "$VNC_PASSWORD" > /.password1
|
||||||
|
x11vnc -storepasswd $(cat /.password1) /.password2
|
||||||
|
chmod 400 /.password*
|
||||||
|
sed -i 's/^command=x11vnc.*/& -rfbauth \/.password2/' /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
export VNC_PASSWORD=
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$X11VNC_ARGS" ]; then
|
||||||
|
sed -i "s/^command=x11vnc.*/& ${X11VNC_ARGS}/" /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$OPENBOX_ARGS" ]; then
|
||||||
|
sed -i "s#^command=/usr/bin/openbox\$#& ${OPENBOX_ARGS}#" /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$RESOLUTION" ]; then
|
||||||
|
sed -i "s/1024x768/$RESOLUTION/" /usr/local/bin/xvfb.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
USER=${USER:-root}
|
||||||
|
HOME=/root
|
||||||
|
if [ "$USER" != "root" ]; then
|
||||||
|
echo "* enable custom user: $USER"
|
||||||
|
useradd --create-home --shell /bin/bash --user-group --groups adm,sudo $USER
|
||||||
|
if [ -z "$PASSWORD" ]; then
|
||||||
|
echo " set default password to \"ubuntu\""
|
||||||
|
PASSWORD=ubuntu
|
||||||
|
fi
|
||||||
|
HOME=/home/$USER
|
||||||
|
echo "$USER:$PASSWORD" | chpasswd
|
||||||
|
cp -r /root/{.config,.gtkrc-2.0,.asoundrc} ${HOME}
|
||||||
|
chown -R $USER:$USER ${HOME}
|
||||||
|
[ -d "/dev/snd" ] && chgrp -R adm /dev/snd
|
||||||
|
fi
|
||||||
|
sed -i -e "s|%USER%|$USER|" -e "s|%HOME%|$HOME|" /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
||||||
|
# home folder
|
||||||
|
if [ ! -x "$HOME/.config/pcmanfm/LXDE/" ]; then
|
||||||
|
mkdir -p $HOME/.config/pcmanfm/LXDE/
|
||||||
|
ln -sf /usr/local/share/doro-lxde-wallpapers/desktop-items-0.conf $HOME/.config/pcmanfm/LXDE/
|
||||||
|
chown -R $USER:$USER $HOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
# nginx workers
|
||||||
|
sed -i 's|worker_processes .*|worker_processes 1;|' /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
# nginx ssl
|
||||||
|
if [ -n "$SSL_PORT" ] && [ -e "/etc/nginx/ssl/nginx.key" ]; then
|
||||||
|
echo "* enable SSL"
|
||||||
|
sed -i 's|#_SSL_PORT_#\(.*\)443\(.*\)|\1'$SSL_PORT'\2|' /etc/nginx/sites-enabled/default
|
||||||
|
sed -i 's|#_SSL_PORT_#||' /etc/nginx/sites-enabled/default
|
||||||
|
fi
|
||||||
|
|
||||||
|
# nginx http base authentication
|
||||||
|
if [ -n "$HTTP_PASSWORD" ]; then
|
||||||
|
echo "* enable HTTP base authentication"
|
||||||
|
htpasswd -bc /etc/nginx/.htpasswd $USER $HTTP_PASSWORD
|
||||||
|
sed -i 's|#_HTTP_PASSWORD_#||' /etc/nginx/sites-enabled/default
|
||||||
|
fi
|
||||||
|
|
||||||
|
# dynamic prefix path renaming
|
||||||
|
if [ -n "$RELATIVE_URL_ROOT" ]; then
|
||||||
|
echo "* enable RELATIVE_URL_ROOT: $RELATIVE_URL_ROOT"
|
||||||
|
sed -i 's|#_RELATIVE_URL_ROOT_||' /etc/nginx/sites-enabled/default
|
||||||
|
sed -i 's|_RELATIVE_URL_ROOT_|'$RELATIVE_URL_ROOT'|' /etc/nginx/sites-enabled/default
|
||||||
|
fi
|
||||||
|
|
||||||
|
# clearup
|
||||||
|
PASSWORD=
|
||||||
|
HTTP_PASSWORD=
|
||||||
|
|
||||||
|
touch /tmp/prince-trunks-has-returned
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "hey!"
|
||||||
|
echo
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
service ssh restart;
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
service cron status
|
||||||
|
|
||||||
|
service cron restart
|
||||||
|
|
||||||
|
service cron status
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
cd /
|
||||||
|
|
||||||
|
rm -rf /yankee-gnome-fire-consumer
|
||||||
|
|
||||||
|
git clone https://code.yankee.embanet.online/yankee/yankee-gnome-fire-consumer.git
|
||||||
|
|
||||||
|
chmod 777 yankee-gnome-fire-consumer -R
|
||||||
|
|
||||||
|
cd yankee-gnome-fire-consumer
|
||||||
|
|
||||||
|
chmod +x *.bash
|
||||||
|
|
||||||
|
chmod +x *.sh
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
echo "scheduling the cron job"
|
||||||
|
|
||||||
|
bash smart-cron-builder.bash
|
||||||
|
|
||||||
|
echo "cron job scheduled"
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
touch /tmp/prince-trunks-has-returned-after
|
||||||
109
trash/composeX.bash
Executable file
109
trash/composeX.bash
Executable file
@@ -0,0 +1,109 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
reset
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
processorCount=`grep -c '^processor' /proc/cpuinfo`
|
||||||
|
|
||||||
|
processorCount=$((processorCount - 1))
|
||||||
|
|
||||||
|
echo "num cpus / "$processorCount
|
||||||
|
|
||||||
|
for i in $(seq 2 "$processorCount"); do
|
||||||
|
|
||||||
|
echo "Processing unit: $i"
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
rm -f compose.yaml
|
||||||
|
|
||||||
|
echo "services:" >> compose.yaml
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
for x in $(seq 1 "$processorCount"); do
|
||||||
|
|
||||||
|
i=$(printf "%03d" "$x")
|
||||||
|
|
||||||
|
# Create the service definition
|
||||||
|
service_def=$(cat <<EOF
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## orchestration / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################$i
|
||||||
|
|
||||||
|
yankee-desktop-remix-$i:
|
||||||
|
container_name: yankee-desktop-remix-$i
|
||||||
|
image: softwareshinobi/yankee-desktop-remix
|
||||||
|
restart: unless-stopped
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- yankee-nfs-downloads:/root/Downloads
|
||||||
|
hostname: yankee-desktop-$i
|
||||||
|
ports:
|
||||||
|
- "2${i}2:22"
|
||||||
|
- "2${i}8:80"
|
||||||
|
- "2${i}9:5900"
|
||||||
|
environment:
|
||||||
|
TZ: America/Bogota
|
||||||
|
USER_UID: 1000
|
||||||
|
USER_GID: 1000
|
||||||
|
USER: root
|
||||||
|
PASSWORD: yankee
|
||||||
|
HTTP_PASSWORD: yankee
|
||||||
|
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
# Append the service definition to compose.yaml
|
||||||
|
echo "$service_def" >> compose.yaml
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# Add the volumes section ONCE after the loop (outside)
|
||||||
|
cat <<EOF >> compose.yaml
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
##
|
||||||
|
## volumes / yankee-desktop-remix
|
||||||
|
##
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
yankee-nfs-downloads:
|
||||||
|
driver_opts:
|
||||||
|
type: "nfs"
|
||||||
|
o: nfsvers=4,addr=osiris.yankee.embanet.online,nolock,hard,rw
|
||||||
|
device: ":/"
|
||||||
|
|
||||||
|
EOF
|
||||||
|
#... your commands to process each unit...
|
||||||
|
|
||||||
|
done
|
||||||
|
##
|
||||||
|
|
||||||
|
docker compose down --remove-orphans
|
||||||
|
|
||||||
|
docker compose up -d
|
||||||
|
|
||||||
|
docker stats
|
||||||
Reference in New Issue
Block a user