-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release/1.2.0
- Loading branch information
Showing
48 changed files
with
726 additions
and
491 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
TAG=1.0 | ||
TAG_DEVEL=1.1 | ||
TAG=1.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ logs/* | |
.idea/ | ||
webapp/.idea/ | ||
engine/.idea/ | ||
.vscode | ||
|
||
#pytest | ||
.pytest_cache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
version: "3.5" | ||
services: | ||
isard-database: | ||
container_name: isard-database-devel | ||
ports: | ||
- "8080:8080" | ||
- "28015:28015" | ||
|
||
isard-nginx: | ||
container_name: isard-nginx-devel | ||
|
||
isard-hypervisor: | ||
container_name: isard-hypervisor-devel | ||
ports: | ||
- "2022:22" | ||
|
||
isard-app: | ||
container_name: isard-app-devel | ||
ports: | ||
- "5000:5000" | ||
- "5555:5555" | ||
build: | ||
target: development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,55 @@ | ||
FROM isard/alpine-pandas:latest | ||
FROM alpine:3.8 as production | ||
MAINTAINER isard <[email protected]> | ||
|
||
RUN apk add --no-cache bash yarn py3-libvirt py3-paramiko py3-lxml py3-pexpect py3-openssl py3-bcrypt py3-gevent py3-flask py3-netaddr py3-requests curl openssh-client | ||
RUN apk add --no-cache \ | ||
yarn \ | ||
py3-libvirt \ | ||
py3-paramiko \ | ||
py3-lxml \ | ||
py3-pexpect \ | ||
py3-openssl \ | ||
py3-bcrypt \ | ||
py3-gevent \ | ||
py3-flask \ | ||
py3-netaddr \ | ||
py3-requests \ | ||
curl \ | ||
openssh-client \ | ||
supervisor | ||
|
||
RUN apk add --no-cache --virtual .build_deps \ | ||
build-base \ | ||
python3-dev \ | ||
libffi-dev \ | ||
openssl-dev | ||
RUN pip3 install --no-cache-dir pandas | ||
RUN apk del .build_deps | ||
|
||
COPY dockers/app/requirements.pip3 /requirements.pip3 | ||
RUN pip3 install --no-cache-dir -r requirements.pip3 | ||
|
||
RUN mkdir -p /root/.ssh | ||
RUN echo "Host isard-hypervisor \ | ||
# Create the required directories | ||
RUN mkdir -p /var/log/supervisor /isard /root/.ssh | ||
|
||
# Configure SSH | ||
RUN echo -e "Host isard-hypervisor\n \ | ||
StrictHostKeyChecking no" >/root/.ssh/config | ||
RUN chmod 600 /root/.ssh/config | ||
|
||
RUN apk add --no-cache supervisor | ||
RUN mkdir -p /var/log/supervisor | ||
# Copy the isard source | ||
COPY ./src /isard | ||
RUN mv /isard/isard.conf.docker /isard/isard.conf | ||
|
||
COPY dockers/app/certs.sh / | ||
COPY dockers/app/add-hypervisor.sh / | ||
COPY dockers/app/supervisord.conf /etc/supervisord.conf | ||
|
||
EXPOSE 5000 | ||
|
||
COPY dockers/app/certs.sh / | ||
COPY dockers/app/add-hypervisor.sh / | ||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] | ||
|
||
RUN mkdir /isard | ||
ADD ./src /isard | ||
RUN mv /isard/isard.conf.docker /isard/isard.conf | ||
FROM production as development | ||
RUN pip3 install --no-cache-dir ipython pytest | ||
RUN apk add --no-cache --update bash vim openssh bash | ||
|
||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ then | |
USER=root | ||
fi | ||
|
||
apk add sshpass | ||
apk add --no-cache sshpass | ||
if [ -f /NEWHYPER ] | ||
then | ||
rm /NEWHYPER | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,3 @@ graphyte==1.4 | |
pem==18.2.0 | ||
Flask-Login==0.4.1 | ||
xmltodict==0.11.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,53 @@ | ||
FROM isard/alpine-pandas:1.0.0 | ||
FROM alpine:3.9 | ||
MAINTAINER isard <[email protected]> | ||
|
||
RUN pip3 uninstall pandas pytz python-dateutil six -y | ||
RUN apk add --no-cache \ | ||
qemu-system-x86_64 \ | ||
libvirt \ | ||
netcat-openbsd \ | ||
libvirt-daemon \ | ||
dbus \ | ||
polkit \ | ||
qemu-img \ | ||
openssh \ | ||
curl \ | ||
python3 \ | ||
supervisor | ||
|
||
RUN apk add --no-cache --virtual .build_deps \ | ||
build-base \ | ||
python3-dev | ||
RUN pip3 install --no-cache-dir websockify==0.8.0 | ||
RUN apk del .build_deps | ||
|
||
RUN apk --no-cache add qemu-system-x86_64 libvirt netcat-openbsd libvirt-daemon dbus polkit qemu-img | ||
RUN ln -s /usr/bin/qemu-system-x86_64 /usr/bin/qemu-kvm | ||
RUN apk add openssh curl bash | ||
RUN ssh-keygen -A | ||
ADD dockers/hypervisor/reset-hyper.sh / | ||
RUN chmod 744 reset-hyper.sh | ||
|
||
# SSH configuration | ||
RUN echo "root:isard" |chpasswd | ||
RUN sed -i 's|[#]*PermitRootLogin prohibit-password|PermitRootLogin yes|g' /etc/ssh/sshd_config | ||
RUN sed -i 's|[#]*PasswordAuthentication yes|PasswordAuthentication yes|g' /etc/ssh/sshd_config | ||
RUN sed -i 's|[#]*ChallengeResponseAuthentication yes|ChallengeResponseAuthentication yes|g' /etc/ssh/sshd_config | ||
RUN sed -i 's|[#]*UsePAM yes|UsePAM yes|g' /etc/ssh/sshd_config | ||
|
||
RUN echo "listen_tls = 0" >> /etc/libvirt/libvirtd.conf; | ||
RUN echo 'listen_tcp = 1' >> /etc/libvirt/libvirtd.conf; | ||
|
||
# libvirt configuration and certs | ||
RUN echo 'spice_listen = "0.0.0.0"' >> /etc/libvirt/qemu.conf && \ | ||
echo 'spice_tls = 1' >> /etc/libvirt/qemu.conf && \ | ||
echo 'spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice"' >> /etc/libvirt/qemu.conf | ||
RUN mkdir -p /etc/pki/libvirt-spice | ||
|
||
RUN apk add --no-cache --virtual .build_deps build-base python3-dev | ||
RUN pip3 install --no-cache-dir websockify==0.8.0 | ||
RUN apk del .build_deps | ||
ADD dockers/hypervisor/start_proxy.py / | ||
RUN ssh-keygen -A | ||
RUN sed -i \ | ||
-e 's|[#]*PermitRootLogin prohibit-password|PermitRootLogin yes|g' \ | ||
-e 's|[#]*PasswordAuthentication yes|PasswordAuthentication yes|g' \ | ||
-e 's|[#]*ChallengeResponseAuthentication yes|ChallengeResponseAuthentication yes|g' \ | ||
-e 's|[#]*UsePAM yes|UsePAM yes|g' /etc/ssh/sshd_config | ||
|
||
# Libvirt configuration and certs | ||
RUN echo -e "listen_tls = 0\n \ | ||
listen_tcp = 1" >> /etc/libvirt/libvirtd.conf | ||
RUN echo -e 'spice_listen = "0.0.0.0"\n \ | ||
spice_tls = 1\n \ | ||
spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice"' >> /etc/libvirt/qemu.conf | ||
|
||
# Create the required directories | ||
RUN mkdir -p /etc/pki/libvirt-spice /var/log/supervisor | ||
|
||
COPY dockers/hypervisor/reset-hyper.sh / | ||
COPY dockers/hypervisor/start_proxy.py / | ||
COPY dockers/hypervisor/supervisord.conf /etc/supervisord.conf | ||
|
||
EXPOSE 22 | ||
EXPOSE 5900-5950 | ||
EXPOSE 55900-55950 | ||
|
||
VOLUME ["/isard" ] | ||
|
||
RUN apk add --no-cache supervisor | ||
RUN mkdir -p /var/log/supervisor | ||
COPY dockers/hypervisor/supervisord.conf /etc/supervisord.conf | ||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] | ||
|
||
|
||
VOLUME [ "/isard" ] | ||
|
||
CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisord.conf" ] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import multiprocessing | ||
import websockify | ||
import socket | ||
servers={} | ||
|
||
servers = {} | ||
procs = {} | ||
|
||
for i in range(50): | ||
servers[i]=websockify.WebSocketProxy(listen_host='0.0.0.0', | ||
listen_port=55900+i, | ||
target_host=socket.getfqdn(), | ||
target_port=5900+i, | ||
cert="/etc/pki/libvirt-spice/server-cert.pem", | ||
key="/etc/pki/libvirt-spice/server-key.pem") | ||
servers[i] = websockify.WebSocketProxy( | ||
listen_host="0.0.0.0", | ||
listen_port=55900 + i, | ||
target_host=socket.getfqdn(), | ||
target_port=5900 + i, | ||
cert="/etc/pki/libvirt-spice/server-cert.pem", | ||
key="/etc/pki/libvirt-spice/server-key.pem", | ||
) | ||
procs[i] = multiprocessing.Process(target=servers[i].start_server) | ||
procs[i].start() | ||
|
Oops, something went wrong.