mirror of
https://github.com/gryf/boxpy.git
synced 2026-02-02 06:05:47 +01:00
Compare commits
62 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 88172acd67 | |||
| 4c3aef3a85 | |||
| 189fbab17d | |||
| eeebab74ad | |||
| 81ab5de7c4 | |||
| 62b86d5f81 | |||
| 14cd805e00 | |||
| 86b02fca1b | |||
| 3d840de3ee | |||
| 2a1a4cf40a | |||
| 71bf5b6d99 | |||
| e73d5ce458 | |||
| d623114f69 | |||
| 51f642bea0 | |||
| 12df0e97df | |||
| 5f0def3103 | |||
| 43eabb9947 | |||
| 55416db13d | |||
| 86a5655025 | |||
| 259d11e409 | |||
| b2457d497e | |||
| 15a6ecb540 | |||
| 10543cb506 | |||
| 1f1084f294 | |||
| f5ed3d37ac | |||
| 1483f49461 | |||
| f0282874f8 | |||
| 4db0b422b8 | |||
| c3ee529d95 | |||
| cdcb7ffdce | |||
| 9658a9ef36 | |||
| 706dfe8688 | |||
| 8252e189cc | |||
| e6d4d8ab7a | |||
| b7b4ba5cbc | |||
| 47766b6cd9 | |||
| 55cb8d5e30 | |||
| 276ddd8681 | |||
| 0fb0d64db6 | |||
| 847279a990 | |||
| 38ed618b5b | |||
| 1c39cd1985 | |||
| ed25a0d208 | |||
| 20120d898a | |||
| e63d83fc7f | |||
| 0093e32b74 | |||
| 353d848072 | |||
| 4581ab0ed0 | |||
| deba0aa621 | |||
| 6528813d6a | |||
| 9699e61b35 | |||
| f46432546e | |||
| fe422576cd | |||
| a7b0984f77 | |||
| 085785af46 | |||
| 9288179474 | |||
| a5702254ca | |||
| 74053995c8 | |||
| 1999f1dc7e | |||
| 7f99f91933 | |||
| db8a42518e | |||
| c19f4f1a61 |
109
README.rst
109
README.rst
@@ -2,8 +2,8 @@
|
||||
box.py
|
||||
======
|
||||
|
||||
Box.py is a simple automation tool meant to run Ubuntu or Fedora cloud images
|
||||
on top of VirtualBox.
|
||||
Box.py is a simple automation tool meant to run Ubuntu, Fedora, Centos Stream
|
||||
or Debian cloud images on top of VirtualBox.
|
||||
|
||||
What it does is simply download official cloud image, set up VM, tweak it up
|
||||
and do the initial pre-configuration using generated config drive.
|
||||
@@ -16,37 +16,69 @@ weird named options for ``vboxmanage`` ;P)
|
||||
Requirements
|
||||
------------
|
||||
|
||||
- Python 3.x
|
||||
- Python >=3.8
|
||||
|
||||
- `pyyaml`_
|
||||
- `requests`_
|
||||
|
||||
- Virtualbox (obviously)
|
||||
- ``mkisofs`` or ``genisoimage`` command for generating iso image
|
||||
- ``mkisofs`` or ``genisoimage`` command for generating ISO image
|
||||
- ``wget`` command for fetching images
|
||||
- ``sha256sum`` command for checksum check
|
||||
- ``sha256sum`` and ``sha512sum`` commands for checksum check
|
||||
- ``qemu-img`` from *qemu-utils* package command for converting between images
|
||||
formats
|
||||
|
||||
|
||||
Tested distros
|
||||
--------------
|
||||
|
||||
- Ubuntu
|
||||
- 18.04
|
||||
- 20.04
|
||||
- 22.04
|
||||
- 24.04
|
||||
- Fedora
|
||||
- 37
|
||||
- 38
|
||||
- 39
|
||||
- 40
|
||||
- 41
|
||||
- Centos Stream
|
||||
- 8
|
||||
- 9
|
||||
- Debian
|
||||
- 10 (buster)
|
||||
- 11 (bullseye)
|
||||
- 12 (bookworm)
|
||||
- 13 (trixie) - prerelease
|
||||
|
||||
There is possibility to use whatever OS image which supports cloud-init. Use
|
||||
the ``--image`` param for ``create`` command to pass image filename, although
|
||||
it's wise to at least discover (or not, but it may be easier in certain
|
||||
distributions) what username is supposed to be used as a default user and pass
|
||||
it with ``--username`` param.
|
||||
|
||||
|
||||
How to run it
|
||||
-------------
|
||||
|
||||
First, make sure you fulfill the requirements; either by using packages from
|
||||
your operating system, or by using virtualenv for Python requirements, i.e.:
|
||||
your operating system, or by using virtualenv, i.e.:
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
$ python -m virtualenv .venv
|
||||
$ . .venv/bin/activate
|
||||
(.venv) $ pip install requirements.txt
|
||||
(.venv) $ pip install .
|
||||
|
||||
then you can issue:
|
||||
You'll have ``boxpy`` command created for you as well.
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
$ alias boxpy='python /path/to/box.py'
|
||||
$ boxpy -V
|
||||
boxpy 1.9.2
|
||||
|
||||
or simply link it somewhere in the path:
|
||||
Other option is simply link it somewhere in the path:
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
@@ -54,25 +86,25 @@ or simply link it somewhere in the path:
|
||||
$ chmod +x ~/bin/boxpy
|
||||
|
||||
and now you can issue some command. For example, to spin up a VM with Ubuntu
|
||||
18.04 with one CPU, 2GB of memory and 10GB of disk:
|
||||
20.04 with one CPU, 1GB of memory and 6GB of disk:
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
$ boxpy create --version 18.04 myvm
|
||||
$ boxpy create --version 20.04 myvm
|
||||
|
||||
note, that Ubuntu is default distribution you don't need to specify
|
||||
``--distro`` nor ``--version`` it will pick up latest LTS version. Now, let's
|
||||
recreate it with 20.04:
|
||||
recreate it with 22.04:
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
$ boxpy rebuild --version 20.04 myvm
|
||||
$ boxpy rebuild --version 22.04 myvm
|
||||
|
||||
or recreate it with Fedora and add additional CPU:
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
$ boxpy rebuild --distro fedora --version 34 --cpu 2 myvm
|
||||
$ boxpy rebuild --distro fedora --version 39 --cpu 2 myvm
|
||||
|
||||
now, let's connect to the VM using either ssh command, which is printed out at
|
||||
as last ``boxpy`` output line, or simply by using ssh boxpy command:
|
||||
@@ -90,17 +122,23 @@ use it ad-hoc, or place on your ``.bashrc`` or whatever:
|
||||
|
||||
Currently, following commands are available:
|
||||
|
||||
- ``list`` - for quickly listing all/running VMs
|
||||
- ``info`` - to get summary about VM
|
||||
- ``destroy`` - that is probably obvious one
|
||||
- ``completion`` - as described above
|
||||
- ``create`` - create new VM
|
||||
- ``destroy`` - that is probably obvious one
|
||||
- ``info`` - to get summary about VM
|
||||
- ``list`` - for quickly listing all/running VMs
|
||||
- ``rebuild`` - recreate specified VM
|
||||
- ``ssh`` - connect to the VM using ssh
|
||||
- ``completion`` - as described above
|
||||
- ``start`` - stop the running VM
|
||||
- ``stop`` - start stopped VM
|
||||
|
||||
All of the commands have a range of options, and can be examined by using
|
||||
``--help`` option.
|
||||
|
||||
|
||||
YAML Configuration
|
||||
------------------
|
||||
|
||||
What is more interesting though, is the fact, that you can pass your own
|
||||
`cloud-init`_ yaml file, so that VM can be provisioned in easy way.
|
||||
|
||||
@@ -140,11 +178,20 @@ pass filenames to the custom config, instead of filling up
|
||||
permissions: '0644'
|
||||
filename: /path/to/local/file.txt
|
||||
|
||||
during processing this file, boxpy will look for ``filename`` key in the yaml
|
||||
file for the ``write_files`` sections, and it will remove that key, read the
|
||||
file and put its contents under ``content`` key. What is more important, that
|
||||
will be done after template processing, so there will be no interference for
|
||||
possible ``$`` characters.
|
||||
or
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
write_files:
|
||||
- path: /opt/somefile.txt
|
||||
permissions: '0644'
|
||||
url: https://some.url/content
|
||||
|
||||
during processing this file, boxpy will look for ``filename`` or ``url`` keys
|
||||
in the yaml file for the ``write_files`` sections, and it will remove that key,
|
||||
read the file and put its contents under ``content`` key. What is more
|
||||
important, that will be done after template processing, so there will be no
|
||||
interference for possible ``$`` characters.
|
||||
|
||||
What is more interesting is the fact, that you could use whatever cloud-init
|
||||
accepts, and a special section, for keeping configuration, so that you don't
|
||||
@@ -193,6 +240,19 @@ configuration additional NIC for virtual machine, i.e:
|
||||
advanced:
|
||||
nic2: intnet
|
||||
|
||||
To select image from local file system, it is possible to set one by providing
|
||||
it under ``boxpy_data.image`` key:
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
…
|
||||
boxpy_data:
|
||||
image: /path/to/the/qcow2/image
|
||||
default_user: cloud-user
|
||||
|
||||
Note, that default_user is also needed to be provided, as there is no guess,
|
||||
what is the default username for cloud-init configured within provided image.
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
@@ -202,3 +262,4 @@ This work is licensed under GPL-3.
|
||||
|
||||
.. _pyyaml: https://github.com/yaml/pyyaml
|
||||
.. _cloud-init: https://cloudinit.readthedocs.io
|
||||
.. _requests: https://docs.python-requests.org
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package_update: true
|
||||
packages:
|
||||
- bash-completion
|
||||
- ctags-etags
|
||||
- ctags
|
||||
- git
|
||||
- git-review
|
||||
- htop
|
||||
@@ -12,7 +12,6 @@ packages:
|
||||
write_files:
|
||||
- path: /tmp/local.conf
|
||||
permissions: '0644'
|
||||
owner: fedora:fedora
|
||||
content: |
|
||||
[[local|localrc]]
|
||||
ADMIN_PASSWORD=pass
|
||||
@@ -24,13 +23,13 @@ write_files:
|
||||
disable_service n-vnc
|
||||
disable_service dstat
|
||||
runcmd:
|
||||
- [su, -, fedora, -c, "git clone https://opendev.org/openstack/devstack ~/devstack"]
|
||||
- [su, -, fedora, -c, "cp /tmp/local.conf /home/fedora/devstack/"]
|
||||
- [su, -, fedora, -c, "echo 'export HOST_IP=10.0.2.15' >> .bashrc"]
|
||||
- su - fedora -c "git clone https://opendev.org/openstack/devstack ~/devstack"
|
||||
- su - fedora -c "cp /tmp/local.conf /home/fedora/devstack/"
|
||||
- su - fedora -c "echo 'export HOST_IP=10.0.2.15' >> .bashrc"
|
||||
boxpy_data:
|
||||
key: vm
|
||||
cpus: 2
|
||||
memory: 4GB
|
||||
disk_size: 10GB
|
||||
distro: fedora
|
||||
version: 32
|
||||
version: 36
|
||||
@@ -7,7 +7,7 @@ packages:
|
||||
- ipython3
|
||||
- jq
|
||||
- mc
|
||||
- python-apsw
|
||||
- python3-apsw
|
||||
- python3-flake8
|
||||
- python3-jedi
|
||||
- python3-pip
|
||||
@@ -19,7 +19,6 @@ packages:
|
||||
write_files:
|
||||
- path: /tmp/local.conf
|
||||
permissions: '0644'
|
||||
owner: ubuntu:ubuntu
|
||||
content: |
|
||||
[[local|localrc]]
|
||||
ADMIN_PASSWORD=pass
|
||||
@@ -27,15 +26,15 @@ write_files:
|
||||
RABBIT_PASSWORD=$$ADMIN_PASSWORD
|
||||
SERVICE_PASSWORD=$$ADMIN_PASSWORD
|
||||
runcmd:
|
||||
- [su, -, ubuntu, -c, "git clone https://github.com/gryf/vmstrap"]
|
||||
- [su, -, ubuntu, -c, "vmstrap/bootstrap.sh"]
|
||||
- [rm, -fr, /home/ubuntu/vmstrap]
|
||||
- [su, -, ubuntu, -c, "cp /tmp/local.conf /home/ubuntu/devstack/"]
|
||||
- [su, -, ubuntu, -c, "echo 'export HOST_IP=10.0.2.15' >> .bashrc"]
|
||||
- apt purge -y python3-pyasn1-modules
|
||||
- apt purge -y python3-simplejson
|
||||
- su - ubuntu -c "git clone https://opendev.org/openstack/devstack ~/devstack"
|
||||
- su - ubuntu -c "cp /tmp/local.conf /home/ubuntu/devstack/"
|
||||
- su - ubuntu -c "echo 'export HOST_IP=10.0.2.15' >> .bashrc"
|
||||
boxpy_data:
|
||||
key: vm
|
||||
cpus: 2
|
||||
memory: 6GB
|
||||
disk_size: 10GB
|
||||
distro: ubuntu
|
||||
version: 20.04
|
||||
version: 22.04
|
||||
@@ -7,7 +7,7 @@ packages:
|
||||
- ipython3
|
||||
- jq
|
||||
- mc
|
||||
- python-apsw
|
||||
- python3-apsw
|
||||
- python3-flake8
|
||||
- python3-jedi
|
||||
- python3-pip
|
||||
@@ -31,133 +31,164 @@ write_files:
|
||||
- 192.168.10.10/24
|
||||
- path: /tmp/local.conf
|
||||
permissions: '0644'
|
||||
owner: ubuntu:ubuntu
|
||||
content: |
|
||||
[[local|localrc]]
|
||||
disable_all_services
|
||||
|
||||
disable_service tls-proxy
|
||||
|
||||
|
||||
# Cinder
|
||||
disable_service c-api
|
||||
disable_service c-bak
|
||||
disable_service c-sch
|
||||
disable_service c-vol
|
||||
disable_service cinder
|
||||
|
||||
|
||||
# Coredns
|
||||
disable_service coredns
|
||||
|
||||
# Dstat
|
||||
|
||||
# Dstat
|
||||
disable_service dstat
|
||||
|
||||
|
||||
# ETCD
|
||||
enable_service etcd3
|
||||
|
||||
|
||||
# Glance
|
||||
enable_service g-api
|
||||
enable_service g-reg
|
||||
|
||||
|
||||
# Horizon
|
||||
disable_service horizon
|
||||
|
||||
|
||||
# Keystone
|
||||
enable_service key
|
||||
|
||||
|
||||
# kubernetes
|
||||
enable_service kubernetes-master
|
||||
disable_service kubernetes-worker
|
||||
|
||||
|
||||
# kuryr
|
||||
enable_service kuryr-daemon
|
||||
enable_service kuryr-kubernetes
|
||||
|
||||
|
||||
# mysql.
|
||||
enable_service mysql
|
||||
|
||||
|
||||
# Nova services
|
||||
enable_service n-api
|
||||
enable_service n-api-meta
|
||||
enable_service n-cond
|
||||
enable_service n-cpu
|
||||
enable_service n-sch
|
||||
|
||||
# Neutron
|
||||
enable_service neutron
|
||||
enable_service neutron-tag-ports-during-bulk-creation
|
||||
|
||||
# Octavia
|
||||
enable_service o-api
|
||||
enable_service o-cw
|
||||
enable_service o-da
|
||||
enable_service o-hk
|
||||
enable_service o-hm
|
||||
enable_service octavia
|
||||
|
||||
# OVN
|
||||
|
||||
# Neutron ovn services
|
||||
enable_service ovn-controller
|
||||
enable_service ovn-northd
|
||||
enable_service ovs-vswitchd
|
||||
enable_service ovsdb-server
|
||||
|
||||
|
||||
# Placement API
|
||||
enable_service placement-api
|
||||
enable_service placement-client
|
||||
|
||||
|
||||
# Neutron services
|
||||
enable_service q-agt
|
||||
enable_service q-dhcp
|
||||
enable_service q-l3
|
||||
enable_service q-meta
|
||||
enable_service q-ovn-metadata-agent
|
||||
enable_service q-qos
|
||||
enable_service q-svc
|
||||
enable_service q-trunk
|
||||
enable_service rabbit
|
||||
|
||||
# Swift
|
||||
disable_service s-account
|
||||
disable_service s-container
|
||||
disable_service s-object
|
||||
disable_service s-proxy
|
||||
|
||||
# Tempest
|
||||
enable_service tempest
|
||||
enable_service tls-proxy
|
||||
|
||||
|
||||
# TLS
|
||||
disable_service tls-proxy
|
||||
|
||||
# Vars
|
||||
ADMIN_PASSWORD="secretadmin"
|
||||
CONTAINER_ENGINE="crio"
|
||||
DATABASE_PASSWORD="secretdatabase"
|
||||
ETCD_USE_RAMDISK="True"
|
||||
|
||||
KURYR_ENABLED_HANDLERS="vif,endpoints,service,namespace,pod_label,policy,kuryrnetworkpolicy,kuryrnetwork,kuryrport,kuryrloadbalancer"
|
||||
KURYR_EP_DRIVER_OCTAVIA_PROVIDER="amphora"
|
||||
KURYR_K8S_API_PORT="6443"
|
||||
KURYR_K8S_CLOUD_PROVIDER="False"
|
||||
KURYR_K8S_CONTAINERIZED_DEPLOYMENT="True"
|
||||
KURYR_ENFORCE_SG_RULES="False"
|
||||
KURYR_EP_DRIVER_OCTAVIA_PROVIDER="ovn"
|
||||
KURYR_K8S_MULTI_WORKER_TESTS="True"
|
||||
KURYR_K8S_OCTAVIA_MEMBER_MODE="L2"
|
||||
KURYR_LB_ALGORITHM="SOURCE_IP_PORT"
|
||||
KURYR_NEUTRON_DEFAULT_ROUTER="kuryr-router"
|
||||
KURYR_SG_DRIVER="policy"
|
||||
KURYR_SUBNET_DRIVER="namespace"
|
||||
KURYR_SUPPORT_POD_SECURITY="True"
|
||||
|
||||
LOGFILE="/opt/stack/logs/devstacklog.txt"
|
||||
LOG_COLOR="False"
|
||||
ML2_L3_PLUGIN="router"
|
||||
ML2_L3_PLUGIN="ovn-router,trunk,qos"
|
||||
OCTAVIA_AMP_IMAGE_FILE="/tmp/test-only-amphora-x64-haproxy-ubuntu-bionic.qcow2"
|
||||
OCTAVIA_AMP_IMAGE_NAME="test-only-amphora-x64-haproxy-ubuntu-bionic"
|
||||
OCTAVIA_AMP_IMAGE_SIZE="3"
|
||||
Q_AGENT="openvswitch"
|
||||
Q_ML2_TENANT_NETWORK_TYPE="vxlan"
|
||||
Q_ML2_PLUGIN_MECHANISM_DRIVERS="openvswitch,linuxbridge"
|
||||
|
||||
OVN_BRANCH="v21.06.0"
|
||||
OVN_BUILD_FROM_SOURCE="True"
|
||||
OVN_DBS_LOG_LEVEL="dbg"
|
||||
OVN_L3_CREATE_PUBLIC_NETWORK="True"
|
||||
OVS_BRANCH="a4b04276ab5934d087669ff2d191a23931335c87"
|
||||
|
||||
VAR_RUN_PATH="/usr/local/var/run"
|
||||
|
||||
RABBIT_PASSWORD="secretrabbit"
|
||||
RECLONE="no"
|
||||
SERVICE_PASSWORD="secretservice"
|
||||
SERVICE_TOKEN="password"
|
||||
TEMPEST_PLUGINS="/opt/stack/kuryr-tempest-plugin"
|
||||
USE_PYTHON3="True"
|
||||
|
||||
LIBS_FROM_GIT=cinder,devstack,devstack-gate,devstack-plugin-container,glance,keystone,kuryr-kubernetes,kuryr-tempest-plugin,neutron,nova,octavia,placement,python-octaviaclient,requirements,swift,tempest
|
||||
|
||||
|
||||
LIBS_FROM_GIT=cinder,devstack,devstack-gate,devstack-plugin-container,glance,keystone,kuryr-kubernetes,kuryr-tempest-plugin,neutron,nova,octavia,octavia-tempest-plugin,ovn-octavia-provider,placement,python-octaviaclient,requirements,swift,tempest
|
||||
|
||||
TEMPEST_PLUGINS="/opt/stack/kuryr-tempest-plugin /opt/stack/octavia-tempest-plugin"
|
||||
|
||||
# enabled plugins
|
||||
enable_plugin devstack-plugin-container https://opendev.org/openstack/devstack-plugin-container
|
||||
enable_plugin kuryr-kubernetes https://github.com/gryf/kuryr-kubernetes
|
||||
enable_plugin kuryr-kubernetes https://opendev.org/openstack/kuryr-kubernetes
|
||||
enable_plugin kuryr-tempest-plugin https://opendev.org/openstack/kuryr-tempest-plugin
|
||||
enable_plugin neutron https://opendev.org/openstack/neutron
|
||||
enable_plugin octavia https://opendev.org/openstack/octavia
|
||||
enable_plugin octavia-tempest-plugin https://opendev.org/openstack/octavia-tempest-plugin
|
||||
enable_plugin ovn-octavia-provider https://opendev.org/openstack/ovn-octavia-provider
|
||||
|
||||
[[post-config|$$OCTAVIA_CONF]]
|
||||
[api_settings]
|
||||
enabled_provider_drivers = amphora:'Octavia Amphora driver',ovn:'Octavia OVN driver'
|
||||
runcmd:
|
||||
- [su, -, ubuntu, -c, "git clone https://github.com/gryf/vmstrap"]
|
||||
- [su, -, ubuntu, -c, "vmstrap/bootstrap.sh"]
|
||||
- [rm, -fr, /home/ubuntu/vmstrap]
|
||||
- [su, -, ubuntu, -c, "echo 'export HOST_IP=192.168.10.10' >> .bashrc"]
|
||||
- [su, -, ubuntu, -c, "cp /tmp/local.conf /home/ubuntu/devstack/"]
|
||||
- systemctl stop systemd-resolved.service
|
||||
- systemctl disable systemd-resolved.service
|
||||
- echo "nameserver 1.1.1.1" > /etc/resolv.conf
|
||||
- apt purge -y snapd
|
||||
- apt purge -y python3-pyasn1-modules
|
||||
- apt purge -y python3-simplejson
|
||||
- su - ubuntu -c "git clone https://opendev.org/openstack/devstack"
|
||||
- su - ubuntu -c "cp /tmp/local.conf /home/ubuntu/devstack/"
|
||||
- su - ubuntu -c "echo 'export HOST_IP=192.168.10.10' >> .bashrc"
|
||||
- systemctl restart systemd-networkd
|
||||
boxpy_data:
|
||||
key: vm
|
||||
cpus: 4
|
||||
memory: 16GB
|
||||
disk_size: 50GB
|
||||
version: 20.04
|
||||
advanced:
|
||||
nic2: intnet
|
||||
|
||||
@@ -7,7 +7,7 @@ packages:
|
||||
- ipython3
|
||||
- jq
|
||||
- mc
|
||||
- python-apsw
|
||||
- python3-apsw
|
||||
- python3-flake8
|
||||
- python3-jedi
|
||||
- python3-pip
|
||||
@@ -31,88 +31,112 @@ write_files:
|
||||
- 192.168.10.11/24
|
||||
- path: /tmp/local.conf
|
||||
permissions: '0644'
|
||||
owner: ubuntu:ubuntu
|
||||
content: |
|
||||
[[local|localrc]]
|
||||
disable_all_services
|
||||
|
||||
disable_service tls-proxy
|
||||
|
||||
|
||||
# Cinder
|
||||
disable_service c-bak
|
||||
disable_service c-vol
|
||||
|
||||
|
||||
# Dstat (started to fail recently)
|
||||
disable_service dstat
|
||||
|
||||
|
||||
# Horizon
|
||||
disable_service horizon
|
||||
|
||||
|
||||
# kubernetes
|
||||
disable_service kubernetes-master
|
||||
enable_service kubernetes-worker
|
||||
|
||||
|
||||
# kuryr
|
||||
enable_service kuryr-daemon
|
||||
disable_service kuryr-kubernetes
|
||||
|
||||
|
||||
# Nova
|
||||
enable_service n-cpu
|
||||
|
||||
# OVN
|
||||
|
||||
# Neutron
|
||||
enable_service neutron
|
||||
enable_service ovn-controller
|
||||
disable_service ovn-northd
|
||||
enable_service ovn-octavia-provider
|
||||
enable_service ovs-vswitchd
|
||||
enable_service ovsdb-server
|
||||
|
||||
|
||||
# Placement API
|
||||
enable_service placement-client
|
||||
|
||||
# Neutron services
|
||||
|
||||
# Neutron services cd
|
||||
enable_service q-ovn-metadata-agent
|
||||
disable_service q-svc
|
||||
|
||||
# tempest
|
||||
disable_service tempest
|
||||
|
||||
# tls
|
||||
disable_service tls-proxy
|
||||
|
||||
|
||||
# Vars
|
||||
ADMIN_PASSWORD="secretadmin"
|
||||
CONTAINER_ENGINE="crio"
|
||||
DATABASE_HOST="192.168.10.10"
|
||||
DATABASE_PASSWORD="secretdatabase"
|
||||
ENABLE_CHASSIS_AS_GW="False"
|
||||
GLANCE_HOSTPORT="192.168.10.10:9292"
|
||||
ML2_L3_PLUGIN="router"
|
||||
|
||||
# turn on ovn-provider
|
||||
KURYR_ENFORCE_SG_RULES="False"
|
||||
KURYR_EP_DRIVER_OCTAVIA_PROVIDER="ovn"
|
||||
KURYR_K8S_OCTAVIA_MEMBER_MODE="L2"
|
||||
KURYR_LB_ALGORITHM="SOURCE_IP_PORT"
|
||||
KURYR_NEUTRON_DEFAULT_ROUTER="kuryr-router"
|
||||
VAR_RUN_PATH="/usr/local/var/run"
|
||||
|
||||
KURYR_ENABLED_HANDLERS="vif,endpoints,service,namespace,pod_label,policy,kuryrnetworkpolicy,kuryrnetwork,kuryrport,kuryrloadbalancer"
|
||||
KURYR_FORCE_IMAGE_BUILD="True"
|
||||
KURYR_EP_DRIVER_OCTAVIA_PROVIDER="amphora"
|
||||
KURYR_K8S_API_PORT="6443"
|
||||
KURYR_K8S_CLOUD_PROVIDER="False"
|
||||
KURYR_K8S_CONTAINERIZED_DEPLOYMENT="True"
|
||||
KURYR_SG_DRIVER="policy"
|
||||
KURYR_SUBNET_DRIVER="namespace"
|
||||
|
||||
|
||||
OVN_BRANCH="v21.06.0"
|
||||
OVN_BUILD_FROM_SOURCE="True"
|
||||
OVN_DBS_LOG_LEVEL="dbg"
|
||||
OVN_L3_CREATE_PUBLIC_NETWORK="True"
|
||||
OVS_BRANCH="a4b04276ab5934d087669ff2d191a23931335c87"
|
||||
|
||||
|
||||
LIBVIRT_TYPE="qemu"
|
||||
LOGFILE="/opt/stack/logs/devstacklog.txt"
|
||||
LOG_COLOR="False"
|
||||
Q_AGENT="openvswitch"
|
||||
Q_ML2_TENANT_NETWORK_TYPE="vxlan"
|
||||
Q_ML2_PLUGIN_MECHANISM_DRIVERS="openvswitch,linuxbridge"
|
||||
Q_HOST="192.168.10.10"
|
||||
RABBIT_HOST="192.168.10.10"
|
||||
RABBIT_PASSWORD="secretrabbit"
|
||||
RECLONE="no"
|
||||
SERVICE_HOST="192.168.10.10"
|
||||
SERVICE_PASSWORD="secretservice"
|
||||
SERVICE_TOKEN="password"
|
||||
TEMPEST_PLUGINS="/opt/stack/kuryr-tempest-plugin"
|
||||
USE_PYTHON3="True"
|
||||
|
||||
|
||||
LIBS_FROM_GIT=cinder,devstack,devstack-gate,devstack-plugin-container,glance,keystone,kuryr-kubernetes,kuryr-tempest-plugin,neutron,nova,octavia,placement,python-octaviaclient,requirements,swift,tempest
|
||||
|
||||
|
||||
# enabled plugins
|
||||
enable_plugin devstack-plugin-container https://opendev.org/openstack/devstack-plugin-container
|
||||
enable_plugin kuryr-kubernetes https://opendev.org/openstack/kuryr
|
||||
runcmd:
|
||||
- [su, -, ubuntu, -c, "git clone https://github.com/gryf/vmstrap"]
|
||||
- [su, -, ubuntu, -c, "vmstrap/bootstrap.sh"]
|
||||
- [rm, -fr, /home/ubuntu/vmstrap]
|
||||
- [su, -, ubuntu, -c, "echo 'export HOST_IP=192.168.10.11' >> .bashrc"]
|
||||
- [su, -, ubuntu, -c, "cp /tmp/local.conf /home/ubuntu/devstack/"]
|
||||
- systemctl stop systemd-resolved.service
|
||||
- systemctl disable systemd-resolved.service
|
||||
- echo "nameserver 1.1.1.1" > /etc/resolv.conf
|
||||
- apt purge -y snapd
|
||||
- apt purge -y python3-pyasn1-modules
|
||||
- apt purge -y python3-simplejson
|
||||
- su - ubuntu -c "git clone https://opendev.org/openstack/devstack"
|
||||
- su - ubuntu -c "cp /tmp/local.conf /home/ubuntu/devstack/"
|
||||
- su - ubuntu -c "echo 'export HOST_IP=192.168.10.11' >> .bashrc"
|
||||
- systemctl restart systemd-networkd
|
||||
boxpy_data:
|
||||
key: vm
|
||||
cpus: 4
|
||||
memory: 16GB
|
||||
disk_size: 50GB
|
||||
version: 20.04
|
||||
advanced:
|
||||
nic2: intnet
|
||||
port: 2223
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
packages:
|
||||
- build-essential
|
||||
- exuberant-ctags
|
||||
- gettext
|
||||
- libfontconfig1-dev
|
||||
- libgif-dev
|
||||
@@ -21,13 +22,17 @@ packages:
|
||||
- libxrender-dev
|
||||
- libxt-dev
|
||||
- make
|
||||
- mc
|
||||
- sharutils
|
||||
- silversearcher-ag
|
||||
- tmux
|
||||
- vim-nox
|
||||
- xinit
|
||||
runcmd:
|
||||
- [su, -, ubuntu, -c, "git clone https://github.com/gryf/wmaker -b experimental"]
|
||||
- [su, -, ubuntu, -c, "git clone https://github.com/gryf/vmstrap"]
|
||||
- [su, -, ubuntu, -c, "vmstrap/bootstrap.sh"]
|
||||
- [rm, -fr, /home/ubuntu/vmstrap]
|
||||
- su - ubuntu -c "git clone https://github.com/gryf/wmaker -b experimental"
|
||||
- su - ubuntu -c "git clone https://github.com/gryf/vmstrap"
|
||||
- su - ubuntu -c "vmstrap/bootstrap.sh -c"
|
||||
- rm -fr /home/ubuntu/vmstrap
|
||||
boxpy_data:
|
||||
key: vm
|
||||
cpus: 4
|
||||
|
||||
66
pyproject.toml
Normal file
66
pyproject.toml
Normal file
@@ -0,0 +1,66 @@
|
||||
[build-system]
|
||||
requires = ["setuptools >= 77.0"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "boxpy"
|
||||
dynamic = ["version"]
|
||||
authors = [
|
||||
{name = "Roman Dobosz", email = "gryf73@gmail.com"}
|
||||
]
|
||||
license = "GPL-3.0-or-later"
|
||||
description = "Run Linux cloud image on top of VirtualBox using commandline tool"
|
||||
readme = "README.rst"
|
||||
requires-python = ">=3.8"
|
||||
keywords = ["vboxmanage", "virtualbox", "vm", "virtual machine", "automation"]
|
||||
classifiers = [
|
||||
"Development Status :: 4 - Beta",
|
||||
"Intended Audience :: End Users/Desktop",
|
||||
"Topic :: Terminals",
|
||||
"Topic :: Utilities",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3 :: Only"
|
||||
]
|
||||
dependencies = [
|
||||
"pyyaml>=5.4.1",
|
||||
"requests>=2.26.0"
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/gryf/boxpy"
|
||||
|
||||
[project.scripts]
|
||||
boxpy = "box:main"
|
||||
|
||||
[tool.setuptools]
|
||||
py-modules = ["box"]
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
version = {attr = "box.__version__"}
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 79
|
||||
indent-width = 4
|
||||
|
||||
[tool.ruff.lint]
|
||||
extend-select = [
|
||||
"B", # flake8-bugbear
|
||||
"C4", # flake8-comprehensions
|
||||
"E", # pycodestyle
|
||||
"F", # pyflakes
|
||||
"FA", # flake8-future-annotations
|
||||
"G", # flake8-logging-format
|
||||
"N", # pep8-naming
|
||||
"PGH", # pygrep-hooks
|
||||
"PIE", # flake8-pie
|
||||
"RET", # flake8-return
|
||||
"SIM", # flake8-simplify
|
||||
"UP", # pyupgrade
|
||||
"W", # pycodestyle
|
||||
"YTT", # flake8-2020
|
||||
]
|
||||
@@ -1 +0,0 @@
|
||||
pyyaml>=5.4.1
|
||||
Reference in New Issue
Block a user