mirror of
https://github.com/gryf/boxpy.git
synced 2026-02-02 06:05:47 +01:00
Compare commits
56 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 |
108
README.rst
108
README.rst
@@ -2,8 +2,8 @@
|
|||||||
box.py
|
box.py
|
||||||
======
|
======
|
||||||
|
|
||||||
Box.py is a simple automation tool meant to run Ubuntu or Fedora cloud images
|
Box.py is a simple automation tool meant to run Ubuntu, Fedora, Centos Stream
|
||||||
on top of VirtualBox.
|
or Debian cloud images on top of VirtualBox.
|
||||||
|
|
||||||
What it does is simply download official cloud image, set up VM, tweak it up
|
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.
|
and do the initial pre-configuration using generated config drive.
|
||||||
@@ -16,37 +16,68 @@ weird named options for ``vboxmanage`` ;P)
|
|||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
- Python 3.x
|
- Python >=3.8
|
||||||
|
|
||||||
- `pyyaml`_
|
- `pyyaml`_
|
||||||
|
- `requests`_
|
||||||
|
|
||||||
- Virtualbox (obviously)
|
- Virtualbox (obviously)
|
||||||
- ``mkisofs`` or ``genisoimage`` command for generating iso image
|
- ``mkisofs`` or ``genisoimage`` command for generating ISO image
|
||||||
- ``wget`` command for fetching images
|
- ``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
|
- ``qemu-img`` from *qemu-utils* package command for converting between images
|
||||||
formats
|
formats
|
||||||
|
|
||||||
|
|
||||||
|
Tested distros
|
||||||
|
--------------
|
||||||
|
|
||||||
|
- Ubuntu
|
||||||
|
- 18.04
|
||||||
|
- 20.04
|
||||||
|
- 22.04
|
||||||
|
- 24.04
|
||||||
|
- Fedora
|
||||||
|
- 37
|
||||||
|
- 38
|
||||||
|
- 39
|
||||||
|
- 40
|
||||||
|
- 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
|
How to run it
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
First, make sure you fulfill the requirements; either by using packages from
|
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
|
.. code:: shell-session
|
||||||
|
|
||||||
$ python -m virtualenv .venv
|
$ python -m virtualenv .venv
|
||||||
$ . .venv/bin/activate
|
$ . .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
|
.. 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
|
.. code:: shell-session
|
||||||
|
|
||||||
@@ -54,25 +85,25 @@ or simply link it somewhere in the path:
|
|||||||
$ chmod +x ~/bin/boxpy
|
$ chmod +x ~/bin/boxpy
|
||||||
|
|
||||||
and now you can issue some command. For example, to spin up a VM with Ubuntu
|
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
|
.. 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
|
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
|
``--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
|
.. code:: shell-session
|
||||||
|
|
||||||
$ boxpy rebuild --version 20.04 myvm
|
$ boxpy rebuild --version 22.04 myvm
|
||||||
|
|
||||||
or recreate it with Fedora and add additional CPU:
|
or recreate it with Fedora and add additional CPU:
|
||||||
|
|
||||||
.. code:: shell-session
|
.. 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
|
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:
|
as last ``boxpy`` output line, or simply by using ssh boxpy command:
|
||||||
@@ -90,17 +121,23 @@ use it ad-hoc, or place on your ``.bashrc`` or whatever:
|
|||||||
|
|
||||||
Currently, following commands are available:
|
Currently, following commands are available:
|
||||||
|
|
||||||
- ``list`` - for quickly listing all/running VMs
|
- ``completion`` - as described above
|
||||||
- ``info`` - to get summary about VM
|
|
||||||
- ``destroy`` - that is probably obvious one
|
|
||||||
- ``create`` - create new VM
|
- ``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
|
- ``rebuild`` - recreate specified VM
|
||||||
- ``ssh`` - connect to the VM using ssh
|
- ``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
|
All of the commands have a range of options, and can be examined by using
|
||||||
``--help`` option.
|
``--help`` option.
|
||||||
|
|
||||||
|
|
||||||
|
YAML Configuration
|
||||||
|
------------------
|
||||||
|
|
||||||
What is more interesting though, is the fact, that you can pass your own
|
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.
|
`cloud-init`_ yaml file, so that VM can be provisioned in easy way.
|
||||||
|
|
||||||
@@ -140,11 +177,20 @@ pass filenames to the custom config, instead of filling up
|
|||||||
permissions: '0644'
|
permissions: '0644'
|
||||||
filename: /path/to/local/file.txt
|
filename: /path/to/local/file.txt
|
||||||
|
|
||||||
during processing this file, boxpy will look for ``filename`` key in the yaml
|
or
|
||||||
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
|
.. code:: yaml
|
||||||
will be done after template processing, so there will be no interference for
|
|
||||||
possible ``$`` characters.
|
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
|
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
|
accepts, and a special section, for keeping configuration, so that you don't
|
||||||
@@ -193,6 +239,19 @@ configuration additional NIC for virtual machine, i.e:
|
|||||||
advanced:
|
advanced:
|
||||||
nic2: intnet
|
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
|
License
|
||||||
-------
|
-------
|
||||||
@@ -202,3 +261,4 @@ This work is licensed under GPL-3.
|
|||||||
|
|
||||||
.. _pyyaml: https://github.com/yaml/pyyaml
|
.. _pyyaml: https://github.com/yaml/pyyaml
|
||||||
.. _cloud-init: https://cloudinit.readthedocs.io
|
.. _cloud-init: https://cloudinit.readthedocs.io
|
||||||
|
.. _requests: https://docs.python-requests.org
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package_update: true
|
package_update: true
|
||||||
packages:
|
packages:
|
||||||
- bash-completion
|
- bash-completion
|
||||||
- ctags-etags
|
- ctags
|
||||||
- git
|
- git
|
||||||
- git-review
|
- git-review
|
||||||
- htop
|
- htop
|
||||||
@@ -12,7 +12,6 @@ packages:
|
|||||||
write_files:
|
write_files:
|
||||||
- path: /tmp/local.conf
|
- path: /tmp/local.conf
|
||||||
permissions: '0644'
|
permissions: '0644'
|
||||||
owner: fedora:fedora
|
|
||||||
content: |
|
content: |
|
||||||
[[local|localrc]]
|
[[local|localrc]]
|
||||||
ADMIN_PASSWORD=pass
|
ADMIN_PASSWORD=pass
|
||||||
@@ -24,13 +23,13 @@ write_files:
|
|||||||
disable_service n-vnc
|
disable_service n-vnc
|
||||||
disable_service dstat
|
disable_service dstat
|
||||||
runcmd:
|
runcmd:
|
||||||
- [su, -, fedora, -c, "git clone https://opendev.org/openstack/devstack ~/devstack"]
|
- su - fedora -c "git clone https://opendev.org/openstack/devstack ~/devstack"
|
||||||
- [su, -, fedora, -c, "cp /tmp/local.conf /home/fedora/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 "echo 'export HOST_IP=10.0.2.15' >> .bashrc"
|
||||||
boxpy_data:
|
boxpy_data:
|
||||||
key: vm
|
key: vm
|
||||||
cpus: 2
|
cpus: 2
|
||||||
memory: 4GB
|
memory: 4GB
|
||||||
disk_size: 10GB
|
disk_size: 10GB
|
||||||
distro: fedora
|
distro: fedora
|
||||||
version: 32
|
version: 36
|
||||||
@@ -7,7 +7,7 @@ packages:
|
|||||||
- ipython3
|
- ipython3
|
||||||
- jq
|
- jq
|
||||||
- mc
|
- mc
|
||||||
- python-apsw
|
- python3-apsw
|
||||||
- python3-flake8
|
- python3-flake8
|
||||||
- python3-jedi
|
- python3-jedi
|
||||||
- python3-pip
|
- python3-pip
|
||||||
@@ -19,7 +19,6 @@ packages:
|
|||||||
write_files:
|
write_files:
|
||||||
- path: /tmp/local.conf
|
- path: /tmp/local.conf
|
||||||
permissions: '0644'
|
permissions: '0644'
|
||||||
owner: ubuntu:ubuntu
|
|
||||||
content: |
|
content: |
|
||||||
[[local|localrc]]
|
[[local|localrc]]
|
||||||
ADMIN_PASSWORD=pass
|
ADMIN_PASSWORD=pass
|
||||||
@@ -27,15 +26,15 @@ write_files:
|
|||||||
RABBIT_PASSWORD=$$ADMIN_PASSWORD
|
RABBIT_PASSWORD=$$ADMIN_PASSWORD
|
||||||
SERVICE_PASSWORD=$$ADMIN_PASSWORD
|
SERVICE_PASSWORD=$$ADMIN_PASSWORD
|
||||||
runcmd:
|
runcmd:
|
||||||
- [su, -, ubuntu, -c, "git clone https://github.com/gryf/vmstrap"]
|
- apt purge -y python3-pyasn1-modules
|
||||||
- [su, -, ubuntu, -c, "vmstrap/bootstrap.sh"]
|
- apt purge -y python3-simplejson
|
||||||
- [rm, -fr, /home/ubuntu/vmstrap]
|
- su - ubuntu -c "git clone https://opendev.org/openstack/devstack ~/devstack"
|
||||||
- [su, -, ubuntu, -c, "cp /tmp/local.conf /home/ubuntu/devstack/"]
|
- su - ubuntu -c "cp /tmp/local.conf /home/ubuntu/devstack/"
|
||||||
- [su, -, ubuntu, -c, "echo 'export HOST_IP=10.0.2.15' >> .bashrc"]
|
- su - ubuntu -c "echo 'export HOST_IP=10.0.2.15' >> .bashrc"
|
||||||
boxpy_data:
|
boxpy_data:
|
||||||
key: vm
|
key: vm
|
||||||
cpus: 2
|
cpus: 2
|
||||||
memory: 6GB
|
memory: 6GB
|
||||||
disk_size: 10GB
|
disk_size: 10GB
|
||||||
distro: ubuntu
|
distro: ubuntu
|
||||||
version: 20.04
|
version: 22.04
|
||||||
@@ -7,7 +7,7 @@ packages:
|
|||||||
- ipython3
|
- ipython3
|
||||||
- jq
|
- jq
|
||||||
- mc
|
- mc
|
||||||
- python-apsw
|
- python3-apsw
|
||||||
- python3-flake8
|
- python3-flake8
|
||||||
- python3-jedi
|
- python3-jedi
|
||||||
- python3-pip
|
- python3-pip
|
||||||
@@ -31,133 +31,164 @@ write_files:
|
|||||||
- 192.168.10.10/24
|
- 192.168.10.10/24
|
||||||
- path: /tmp/local.conf
|
- path: /tmp/local.conf
|
||||||
permissions: '0644'
|
permissions: '0644'
|
||||||
owner: ubuntu:ubuntu
|
|
||||||
content: |
|
content: |
|
||||||
[[local|localrc]]
|
[[local|localrc]]
|
||||||
disable_all_services
|
disable_all_services
|
||||||
|
|
||||||
disable_service tls-proxy
|
|
||||||
|
|
||||||
# Cinder
|
# Cinder
|
||||||
disable_service c-api
|
disable_service c-api
|
||||||
disable_service c-bak
|
disable_service c-bak
|
||||||
disable_service c-sch
|
disable_service c-sch
|
||||||
disable_service c-vol
|
disable_service c-vol
|
||||||
disable_service cinder
|
disable_service cinder
|
||||||
|
|
||||||
# Coredns
|
# Coredns
|
||||||
disable_service coredns
|
disable_service coredns
|
||||||
|
|
||||||
# Dstat
|
# Dstat
|
||||||
disable_service dstat
|
disable_service dstat
|
||||||
|
|
||||||
# ETCD
|
# ETCD
|
||||||
enable_service etcd3
|
enable_service etcd3
|
||||||
|
|
||||||
# Glance
|
# Glance
|
||||||
enable_service g-api
|
enable_service g-api
|
||||||
enable_service g-reg
|
enable_service g-reg
|
||||||
|
|
||||||
# Horizon
|
# Horizon
|
||||||
disable_service horizon
|
disable_service horizon
|
||||||
|
|
||||||
# Keystone
|
# Keystone
|
||||||
enable_service key
|
enable_service key
|
||||||
|
|
||||||
# kubernetes
|
# kubernetes
|
||||||
enable_service kubernetes-master
|
enable_service kubernetes-master
|
||||||
disable_service kubernetes-worker
|
disable_service kubernetes-worker
|
||||||
|
|
||||||
# kuryr
|
# kuryr
|
||||||
enable_service kuryr-daemon
|
enable_service kuryr-daemon
|
||||||
enable_service kuryr-kubernetes
|
enable_service kuryr-kubernetes
|
||||||
|
|
||||||
# mysql.
|
# mysql.
|
||||||
enable_service mysql
|
enable_service mysql
|
||||||
|
|
||||||
# Nova services
|
# Nova services
|
||||||
enable_service n-api
|
enable_service n-api
|
||||||
enable_service n-api-meta
|
enable_service n-api-meta
|
||||||
enable_service n-cond
|
enable_service n-cond
|
||||||
enable_service n-cpu
|
enable_service n-cpu
|
||||||
enable_service n-sch
|
enable_service n-sch
|
||||||
|
|
||||||
|
# Neutron
|
||||||
enable_service neutron
|
enable_service neutron
|
||||||
enable_service neutron-tag-ports-during-bulk-creation
|
enable_service neutron-tag-ports-during-bulk-creation
|
||||||
|
|
||||||
|
# Octavia
|
||||||
enable_service o-api
|
enable_service o-api
|
||||||
enable_service o-cw
|
enable_service o-cw
|
||||||
|
enable_service o-da
|
||||||
enable_service o-hk
|
enable_service o-hk
|
||||||
enable_service o-hm
|
enable_service o-hm
|
||||||
enable_service octavia
|
enable_service octavia
|
||||||
|
|
||||||
# OVN
|
# Neutron ovn services
|
||||||
enable_service ovn-controller
|
enable_service ovn-controller
|
||||||
enable_service ovn-northd
|
enable_service ovn-northd
|
||||||
enable_service ovs-vswitchd
|
enable_service ovs-vswitchd
|
||||||
enable_service ovsdb-server
|
enable_service ovsdb-server
|
||||||
|
|
||||||
# Placement API
|
# Placement API
|
||||||
enable_service placement-api
|
enable_service placement-api
|
||||||
enable_service placement-client
|
enable_service placement-client
|
||||||
|
|
||||||
# Neutron services
|
# 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-ovn-metadata-agent
|
||||||
|
enable_service q-qos
|
||||||
enable_service q-svc
|
enable_service q-svc
|
||||||
|
enable_service q-trunk
|
||||||
enable_service rabbit
|
enable_service rabbit
|
||||||
|
|
||||||
|
# Swift
|
||||||
disable_service s-account
|
disable_service s-account
|
||||||
disable_service s-container
|
disable_service s-container
|
||||||
disable_service s-object
|
disable_service s-object
|
||||||
disable_service s-proxy
|
disable_service s-proxy
|
||||||
|
|
||||||
|
# Tempest
|
||||||
enable_service tempest
|
enable_service tempest
|
||||||
enable_service tls-proxy
|
|
||||||
|
# TLS
|
||||||
|
disable_service tls-proxy
|
||||||
|
|
||||||
# Vars
|
# Vars
|
||||||
ADMIN_PASSWORD="secretadmin"
|
ADMIN_PASSWORD="secretadmin"
|
||||||
|
CONTAINER_ENGINE="crio"
|
||||||
DATABASE_PASSWORD="secretdatabase"
|
DATABASE_PASSWORD="secretdatabase"
|
||||||
ETCD_USE_RAMDISK="True"
|
ETCD_USE_RAMDISK="True"
|
||||||
|
|
||||||
KURYR_ENABLED_HANDLERS="vif,endpoints,service,namespace,pod_label,policy,kuryrnetworkpolicy,kuryrnetwork,kuryrport,kuryrloadbalancer"
|
KURYR_ENABLED_HANDLERS="vif,endpoints,service,namespace,pod_label,policy,kuryrnetworkpolicy,kuryrnetwork,kuryrport,kuryrloadbalancer"
|
||||||
KURYR_EP_DRIVER_OCTAVIA_PROVIDER="amphora"
|
KURYR_ENFORCE_SG_RULES="False"
|
||||||
KURYR_K8S_API_PORT="6443"
|
KURYR_EP_DRIVER_OCTAVIA_PROVIDER="ovn"
|
||||||
KURYR_K8S_CLOUD_PROVIDER="False"
|
|
||||||
KURYR_K8S_CONTAINERIZED_DEPLOYMENT="True"
|
|
||||||
KURYR_K8S_MULTI_WORKER_TESTS="True"
|
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"
|
LOGFILE="/opt/stack/logs/devstacklog.txt"
|
||||||
LOG_COLOR="False"
|
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_FILE="/tmp/test-only-amphora-x64-haproxy-ubuntu-bionic.qcow2"
|
||||||
OCTAVIA_AMP_IMAGE_NAME="test-only-amphora-x64-haproxy-ubuntu-bionic"
|
OCTAVIA_AMP_IMAGE_NAME="test-only-amphora-x64-haproxy-ubuntu-bionic"
|
||||||
OCTAVIA_AMP_IMAGE_SIZE="3"
|
OCTAVIA_AMP_IMAGE_SIZE="3"
|
||||||
Q_AGENT="openvswitch"
|
|
||||||
Q_ML2_TENANT_NETWORK_TYPE="vxlan"
|
OVN_BRANCH="v21.06.0"
|
||||||
Q_ML2_PLUGIN_MECHANISM_DRIVERS="openvswitch,linuxbridge"
|
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"
|
RABBIT_PASSWORD="secretrabbit"
|
||||||
RECLONE="no"
|
RECLONE="no"
|
||||||
SERVICE_PASSWORD="secretservice"
|
SERVICE_PASSWORD="secretservice"
|
||||||
SERVICE_TOKEN="password"
|
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,octavia-tempest-plugin,ovn-octavia-provider,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,placement,python-octaviaclient,requirements,swift,tempest
|
TEMPEST_PLUGINS="/opt/stack/kuryr-tempest-plugin /opt/stack/octavia-tempest-plugin"
|
||||||
|
|
||||||
# enabled plugins
|
# enabled plugins
|
||||||
enable_plugin devstack-plugin-container https://opendev.org/openstack/devstack-plugin-container
|
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 kuryr-tempest-plugin https://opendev.org/openstack/kuryr-tempest-plugin
|
||||||
enable_plugin neutron https://opendev.org/openstack/neutron
|
enable_plugin neutron https://opendev.org/openstack/neutron
|
||||||
enable_plugin octavia https://opendev.org/openstack/octavia
|
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:
|
runcmd:
|
||||||
- [su, -, ubuntu, -c, "git clone https://github.com/gryf/vmstrap"]
|
- systemctl stop systemd-resolved.service
|
||||||
- [su, -, ubuntu, -c, "vmstrap/bootstrap.sh"]
|
- systemctl disable systemd-resolved.service
|
||||||
- [rm, -fr, /home/ubuntu/vmstrap]
|
- echo "nameserver 1.1.1.1" > /etc/resolv.conf
|
||||||
- [su, -, ubuntu, -c, "echo 'export HOST_IP=192.168.10.10' >> .bashrc"]
|
- apt purge -y snapd
|
||||||
- [su, -, ubuntu, -c, "cp /tmp/local.conf /home/ubuntu/devstack/"]
|
- 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:
|
boxpy_data:
|
||||||
key: vm
|
key: vm
|
||||||
cpus: 4
|
cpus: 4
|
||||||
memory: 16GB
|
memory: 16GB
|
||||||
disk_size: 50GB
|
disk_size: 50GB
|
||||||
|
version: 20.04
|
||||||
advanced:
|
advanced:
|
||||||
nic2: intnet
|
nic2: intnet
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ packages:
|
|||||||
- ipython3
|
- ipython3
|
||||||
- jq
|
- jq
|
||||||
- mc
|
- mc
|
||||||
- python-apsw
|
- python3-apsw
|
||||||
- python3-flake8
|
- python3-flake8
|
||||||
- python3-jedi
|
- python3-jedi
|
||||||
- python3-pip
|
- python3-pip
|
||||||
@@ -31,88 +31,112 @@ write_files:
|
|||||||
- 192.168.10.11/24
|
- 192.168.10.11/24
|
||||||
- path: /tmp/local.conf
|
- path: /tmp/local.conf
|
||||||
permissions: '0644'
|
permissions: '0644'
|
||||||
owner: ubuntu:ubuntu
|
|
||||||
content: |
|
content: |
|
||||||
[[local|localrc]]
|
[[local|localrc]]
|
||||||
disable_all_services
|
disable_all_services
|
||||||
|
|
||||||
disable_service tls-proxy
|
|
||||||
|
|
||||||
# Cinder
|
# Cinder
|
||||||
disable_service c-bak
|
disable_service c-bak
|
||||||
disable_service c-vol
|
disable_service c-vol
|
||||||
|
|
||||||
# Dstat (started to fail recently)
|
# Dstat (started to fail recently)
|
||||||
disable_service dstat
|
disable_service dstat
|
||||||
|
|
||||||
# Horizon
|
# Horizon
|
||||||
disable_service horizon
|
disable_service horizon
|
||||||
|
|
||||||
# kubernetes
|
# kubernetes
|
||||||
disable_service kubernetes-master
|
disable_service kubernetes-master
|
||||||
enable_service kubernetes-worker
|
enable_service kubernetes-worker
|
||||||
|
|
||||||
# kuryr
|
# kuryr
|
||||||
enable_service kuryr-daemon
|
enable_service kuryr-daemon
|
||||||
disable_service kuryr-kubernetes
|
disable_service kuryr-kubernetes
|
||||||
|
|
||||||
|
# Nova
|
||||||
enable_service n-cpu
|
enable_service n-cpu
|
||||||
|
|
||||||
# OVN
|
# Neutron
|
||||||
|
enable_service neutron
|
||||||
enable_service ovn-controller
|
enable_service ovn-controller
|
||||||
|
disable_service ovn-northd
|
||||||
|
enable_service ovn-octavia-provider
|
||||||
enable_service ovs-vswitchd
|
enable_service ovs-vswitchd
|
||||||
enable_service ovsdb-server
|
enable_service ovsdb-server
|
||||||
|
|
||||||
# Placement API
|
# Placement API
|
||||||
enable_service placement-client
|
enable_service placement-client
|
||||||
|
|
||||||
# Neutron services
|
# Neutron services cd
|
||||||
enable_service q-ovn-metadata-agent
|
enable_service q-ovn-metadata-agent
|
||||||
|
disable_service q-svc
|
||||||
|
|
||||||
|
# tempest
|
||||||
disable_service tempest
|
disable_service tempest
|
||||||
|
|
||||||
|
# tls
|
||||||
disable_service tls-proxy
|
disable_service tls-proxy
|
||||||
|
|
||||||
# Vars
|
# Vars
|
||||||
ADMIN_PASSWORD="secretadmin"
|
ADMIN_PASSWORD="secretadmin"
|
||||||
|
CONTAINER_ENGINE="crio"
|
||||||
DATABASE_HOST="192.168.10.10"
|
DATABASE_HOST="192.168.10.10"
|
||||||
DATABASE_PASSWORD="secretdatabase"
|
DATABASE_PASSWORD="secretdatabase"
|
||||||
|
ENABLE_CHASSIS_AS_GW="False"
|
||||||
GLANCE_HOSTPORT="192.168.10.10:9292"
|
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_ENABLED_HANDLERS="vif,endpoints,service,namespace,pod_label,policy,kuryrnetworkpolicy,kuryrnetwork,kuryrport,kuryrloadbalancer"
|
||||||
KURYR_FORCE_IMAGE_BUILD="True"
|
KURYR_SG_DRIVER="policy"
|
||||||
KURYR_EP_DRIVER_OCTAVIA_PROVIDER="amphora"
|
KURYR_SUBNET_DRIVER="namespace"
|
||||||
KURYR_K8S_API_PORT="6443"
|
|
||||||
KURYR_K8S_CLOUD_PROVIDER="False"
|
|
||||||
KURYR_K8S_CONTAINERIZED_DEPLOYMENT="True"
|
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"
|
LOGFILE="/opt/stack/logs/devstacklog.txt"
|
||||||
LOG_COLOR="False"
|
LOG_COLOR="False"
|
||||||
Q_AGENT="openvswitch"
|
Q_HOST="192.168.10.10"
|
||||||
Q_ML2_TENANT_NETWORK_TYPE="vxlan"
|
|
||||||
Q_ML2_PLUGIN_MECHANISM_DRIVERS="openvswitch,linuxbridge"
|
|
||||||
RABBIT_HOST="192.168.10.10"
|
RABBIT_HOST="192.168.10.10"
|
||||||
RABBIT_PASSWORD="secretrabbit"
|
RABBIT_PASSWORD="secretrabbit"
|
||||||
RECLONE="no"
|
RECLONE="no"
|
||||||
SERVICE_HOST="192.168.10.10"
|
SERVICE_HOST="192.168.10.10"
|
||||||
SERVICE_PASSWORD="secretservice"
|
SERVICE_PASSWORD="secretservice"
|
||||||
SERVICE_TOKEN="password"
|
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,placement,python-octaviaclient,requirements,swift,tempest
|
||||||
|
|
||||||
# enabled plugins
|
# enabled plugins
|
||||||
enable_plugin devstack-plugin-container https://opendev.org/openstack/devstack-plugin-container
|
enable_plugin devstack-plugin-container https://opendev.org/openstack/devstack-plugin-container
|
||||||
enable_plugin kuryr-kubernetes https://opendev.org/openstack/kuryr
|
enable_plugin kuryr-kubernetes https://opendev.org/openstack/kuryr
|
||||||
runcmd:
|
runcmd:
|
||||||
- [su, -, ubuntu, -c, "git clone https://github.com/gryf/vmstrap"]
|
- systemctl stop systemd-resolved.service
|
||||||
- [su, -, ubuntu, -c, "vmstrap/bootstrap.sh"]
|
- systemctl disable systemd-resolved.service
|
||||||
- [rm, -fr, /home/ubuntu/vmstrap]
|
- echo "nameserver 1.1.1.1" > /etc/resolv.conf
|
||||||
- [su, -, ubuntu, -c, "echo 'export HOST_IP=192.168.10.11' >> .bashrc"]
|
- apt purge -y snapd
|
||||||
- [su, -, ubuntu, -c, "cp /tmp/local.conf /home/ubuntu/devstack/"]
|
- 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:
|
boxpy_data:
|
||||||
key: vm
|
key: vm
|
||||||
cpus: 4
|
cpus: 4
|
||||||
memory: 16GB
|
memory: 16GB
|
||||||
disk_size: 50GB
|
disk_size: 50GB
|
||||||
|
version: 20.04
|
||||||
advanced:
|
advanced:
|
||||||
nic2: intnet
|
nic2: intnet
|
||||||
port: 2223
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
packages:
|
packages:
|
||||||
- build-essential
|
- build-essential
|
||||||
|
- exuberant-ctags
|
||||||
- gettext
|
- gettext
|
||||||
- libfontconfig1-dev
|
- libfontconfig1-dev
|
||||||
- libgif-dev
|
- libgif-dev
|
||||||
@@ -21,13 +22,17 @@ packages:
|
|||||||
- libxrender-dev
|
- libxrender-dev
|
||||||
- libxt-dev
|
- libxt-dev
|
||||||
- make
|
- make
|
||||||
|
- mc
|
||||||
- sharutils
|
- sharutils
|
||||||
|
- silversearcher-ag
|
||||||
|
- tmux
|
||||||
|
- vim-nox
|
||||||
- xinit
|
- xinit
|
||||||
runcmd:
|
runcmd:
|
||||||
- [su, -, ubuntu, -c, "git clone https://github.com/gryf/wmaker -b experimental"]
|
- 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 "git clone https://github.com/gryf/vmstrap"
|
||||||
- [su, -, ubuntu, -c, "vmstrap/bootstrap.sh"]
|
- su - ubuntu -c "vmstrap/bootstrap.sh -c"
|
||||||
- [rm, -fr, /home/ubuntu/vmstrap]
|
- rm -fr /home/ubuntu/vmstrap
|
||||||
boxpy_data:
|
boxpy_data:
|
||||||
key: vm
|
key: vm
|
||||||
cpus: 4
|
cpus: 4
|
||||||
|
|||||||
47
pyproject.toml
Normal file
47
pyproject.toml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["setuptools >= 61.0"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "boxpy"
|
||||||
|
dynamic = ["version"]
|
||||||
|
authors = [
|
||||||
|
{name = "Roman Dobosz", email = "gryf73@gmail.com"}
|
||||||
|
]
|
||||||
|
license = {text = "GPLv3"}
|
||||||
|
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",
|
||||||
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
||||||
|
"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 :: 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.distutils.bdist_wheel]
|
||||||
|
universal = true
|
||||||
@@ -1 +0,0 @@
|
|||||||
pyyaml>=5.4.1
|
|
||||||
Reference in New Issue
Block a user