1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-12-25 18:42:59 +00:00

Merge branch 'release/0.1.6'

This commit is contained in:
Jörn-Michael Miehe 2021-09-22 03:15:27 +02:00
commit 61375dffbe
18 changed files with 50 additions and 37 deletions

View file

@ -5,7 +5,7 @@
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/src/venv" />
</content>
<orderEntry type="jdk" jdkName="Pipenv (kiwi-config)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Pipenv (kiwi-scp)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Pipenv (kiwi-config)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Pipenv (kiwi-scp)" project-jdk-type="Python SDK" />
</project>

42
Pipfile.lock generated
View file

@ -18,20 +18,38 @@
"default": {
"pyyaml": {
"hashes": [
"sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97",
"sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76",
"sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2",
"sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648",
"sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf",
"sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f",
"sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2",
"sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee",
"sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d",
"sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c",
"sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a"
"sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf",
"sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696",
"sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393",
"sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77",
"sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922",
"sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5",
"sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8",
"sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10",
"sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc",
"sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018",
"sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e",
"sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253",
"sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347",
"sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183",
"sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541",
"sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb",
"sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185",
"sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc",
"sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db",
"sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa",
"sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46",
"sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122",
"sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b",
"sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63",
"sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df",
"sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc",
"sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247",
"sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6",
"sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"
],
"index": "pypi",
"version": "==5.3.1"
"version": "==5.4.1"
}
},
"develop": {}

View file

@ -2,7 +2,7 @@
# kiwi-scp instance configuration #
###################################
version: '0.1.5'
version: '0.1.6'
runtime:
storage: /tmp/kiwi

View file

@ -5,7 +5,7 @@
#############
# default installation directory
INSTALL_DIR_DEFAULT="/usr/local/bin"
INSTALL_DIR_DEFAULT="/usr/local/sbin"
# URI of "kiwi" launcher script
KIWI_URI="https://raw.githubusercontent.com/ldericher/kiwi-scp/master/kiwi"

2
kiwi
View file

@ -25,7 +25,7 @@ KIWI_VERSION="master"
KIWI_URI="https://raw.githubusercontent.com/ldericher/kiwi-scp/master/kiwi"
INSTALLER_URI="https://raw.githubusercontent.com/ldericher/kiwi-scp/master/install.sh"
# canary file: limit curl requests
CANARY_FILENAME="/tmp/kiwi-scp.canary"
CANARY_FILENAME="/tmp/kiwi-scp-$(id -u).canary"
CANARY_MAX_AGE=600
###################

View file

@ -1 +1 @@
0.1.5
0.1.6

View file

@ -1,7 +1,6 @@
# system
import os
#############
# ENVIRONMENT
@ -10,7 +9,6 @@ KIWI_ROOT = os.getenv('KIWI_ROOT', ".")
# default name of kiwi-scp file
KIWI_CONF_NAME = os.getenv('KIWI_CONF_NAME', "kiwi.yml")
############
# FILE NAMES
@ -27,7 +25,6 @@ CONF_DIRECTORY_NAME = 'conf'
# location for auxiliary Dockerfiles
IMAGES_DIRECTORY_NAME = f"{KIWI_ROOT}/images"
####################
# DOCKER IMAGE NAMES

View file

@ -1,6 +1,6 @@
def _surround(string, bang):
midlane = f"{bang * 3} {string} {bang * 3}"
sidelane = bang*len(midlane)
sidelane = bang * len(midlane)
return f"{sidelane}\n{midlane}\n{sidelane}"

View file

@ -1,10 +1,9 @@
import logging
import os
from .executable import Executable
from ._constants import CONF_DIRECTORY_NAME
from .config import LoadedConfig
from .executable import Executable
class Project:

View file

@ -4,11 +4,11 @@ import subprocess
# local
from .._constants import CONF_DIRECTORY_NAME
from ..executable import Executable
from ..subcommand import SubCommand
from ..config import LoadedConfig
from ..executable import Executable
from ..projects import Projects
from ..rootkit import Rootkit, prefix_path_mnt
from ..subcommand import SubCommand
class ConfCopyCommand(SubCommand):

View file

@ -4,10 +4,10 @@ import subprocess
# local
from ._hidden import _find_net
from ..subcommand import ServiceCommand
from ..config import LoadedConfig
from ..executable import Executable
from ..misc import are_you_sure
from ..subcommand import ServiceCommand
class DownCommand(ServiceCommand):

View file

@ -4,8 +4,8 @@ import os
# local
from .._constants import KIWI_CONF_NAME
from ..subcommand import SubCommand
from ..config import DefaultConfig, LoadedConfig
from ..subcommand import SubCommand
class InitCommand(SubCommand):
@ -42,7 +42,6 @@ class InitCommand(SubCommand):
# check force switch
if args.force and os.path.isfile(KIWI_CONF_NAME):
logging.warning(f"Overwriting existing '{KIWI_CONF_NAME}'!")
config = DefaultConfig.get()

View file

@ -4,10 +4,10 @@ import subprocess
# local
from ._hidden import _find_net
from ..subcommand import SubCommand
from ..config import LoadedConfig
from ..executable import Executable
from ..misc import are_you_sure
from ..subcommand import SubCommand
class PurgeCommand(SubCommand):

View file

@ -1,6 +1,6 @@
# local
from ..subcommand import ServiceCommand
from ..misc import are_you_sure
from ..subcommand import ServiceCommand
class RestartCommand(ServiceCommand):

View file

@ -2,9 +2,9 @@
import logging
import subprocess
from ..config import LoadedConfig
# local
from ..subcommand import ServiceCommand
from ..config import LoadedConfig
def _service_has_executable(project, service, exe_name):
@ -52,7 +52,7 @@ def _find_shell(args, project, service):
elif i + 1 < len(shells):
# try next in list
logging.info(f"Shell '{shell}' not found in container, trying '{shells[i+1]}'")
logging.info(f"Shell '{shell}' not found in container, trying '{shells[i + 1]}'")
elif args.shell:
# not found, user suggestion provided

View file

@ -3,10 +3,10 @@ import logging
import os
import yaml
# local
from ..subcommand import ServiceCommand
from ..project import Project
from ..projects import Projects
# local
from ..subcommand import ServiceCommand
def _print_list(strings):

View file

@ -1,6 +1,6 @@
# local
from ..subcommand import ServiceCommand
from ..misc import are_you_sure
from ..subcommand import ServiceCommand
class UpdateCommand(ServiceCommand):
@ -8,7 +8,7 @@ class UpdateCommand(ServiceCommand):
def __init__(self):
super().__init__(
'update', num_projects='?', num_services='*',
'update', num_projects='?', num_services='*',
action="Updating",
description="Update the whole instance, a project or service(s) inside a project"
)