mirror of
https://github.com/ultravioletrs/cocos.git
synced 2026-06-23 04:10:25 +00:00
8eb1fac9ad
* Refactor and update dependencies in the project - Updated go.sum to replace `github.com/absmach/magistrala` with `github.com/absmach/supermq` across various modules. - Removed VSock configuration from environment variables and QEMU arguments. - Updated QEMU configuration and related tests to remove references to guest CID and VSock. - Added new HTTP transport layer for API endpoints in the manager. - Introduced Prometheus monitoring configuration with alert rules and Alertmanager setup. - Updated service and VM interfaces to remove unused methods and references. - Refactored tests to align with the new structure and dependencies. Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Add MaxVMs configuration and enforce limit on VM creation Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Add comprehensive tests for HTTP transport handlers and endpoints Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Add test case for exceeding maximum number of VMs in TestRun Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Improve error handling in TestHandlerWithCustomRouter to ensure response writing is checked Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Update dependencies to latest versions - Upgrade cel.dev/expr from v0.23.0 to v0.24.0 - Upgrade github.com/absmach/supermq from v0.16.0 to v0.17.0 - Upgrade github.com/cenkalti/backoff from v4.3.0 to v5.0.2 - Upgrade github.com/cncf/xds/go to v0.0.0-20250501225837-2ac532fd4443 - Upgrade github.com/go-chi/chi/v5 from v5.2.1 to v5.2.2 - Upgrade github.com/go-jose/go-jose/v3 from v3.0.3 to v3.0.4 - Upgrade github.com/gofrs/uuid/v5 from v5.3.0 to v5.3.2 - Upgrade github.com/prometheus/client_golang from v1.22.0 to v1.23.0 - Upgrade github.com/prometheus/client_model from v0.6.1 to v0.6.2 - Upgrade github.com/prometheus/common from v0.62.0 to v0.65.0 - Upgrade github.com/prometheus/procfs from v0.15.1 to v0.16.1 - Upgrade go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp from v0.60.0 to v0.62.0 - Upgrade go.opentelemetry.io/otel/exporters/otlp/otlptrace from v1.36.0 to v1.37.0 - Upgrade golang.org/x/crypto from v0.39.0 to v0.40.0 - Upgrade golang.org/x/sys from v0.33.0 to v0.34.0 - Upgrade golang.org/x/text from v0.26.0 to v0.27.0 - Upgrade golang.org/x/time from v0.11.0 to v0.12.0 - Upgrade google.golang.org/grpc from v1.73.0 to v1.74.2 Signed-off-by: Sammy Oina <sammyoina@gmail.com> --------- Signed-off-by: Sammy Oina <sammyoina@gmail.com>
85 lines
1.7 KiB
Bash
85 lines
1.7 KiB
Bash
#### memory config
|
|
MEMORY_SIZE=2048M
|
|
MEMORY_SLOTS=5
|
|
MAX_MEMORY=30G
|
|
|
|
|
|
#### ovmf code config
|
|
OVMF_CODE_IF=pflash
|
|
OVMF_CODE_FORMAT=raw
|
|
OVMF_CODE_UNIT=0
|
|
OVMF_CODE_FILE=/usr/share/OVMF/OVMF_CODE.fd
|
|
OVMF_CODE_READONLY=on
|
|
OVMF_VERSION=
|
|
|
|
#### ovmf vars config
|
|
OVMF_VARS_IF=pflash
|
|
OVMF_VARS_FORMAT=raw
|
|
OVMF_VARS_UNIT=1
|
|
OVMF_VARS_FILE=/usr/share/OVMF/OVMF_VARS.fd
|
|
|
|
#### net dev config
|
|
NET_DEV_ID=vmnic
|
|
NET_DEV_HOST_FWD_AGENT=7020
|
|
NET_DEV_GUEST_FWD_AGENT=7002
|
|
|
|
#### Virtio Net Pci Config
|
|
VIRTIO_NET_PCI_DISABLE_LEGACY=on
|
|
VIRTIO_NET_PCI_IOMMU_PLATFORM=true
|
|
VIRTIO_NET_PCI_ADDR=0x2
|
|
VIRTIO_NET_PCI_ROMFILE=
|
|
|
|
#### Disk image config
|
|
DISK_IMG_KERNEL_FILE=
|
|
DISK_IMG_ROOTFS_FILE=
|
|
|
|
KERNEL_COMMAND_LINE="quiet console=null"
|
|
|
|
#### Sev-Snp Config
|
|
SEV_SNP_ID=sev0
|
|
SEV_SNP_CBIT_POS=51
|
|
SEV_SNP_REDUCED_PHYS_BITS=1
|
|
SEV_SNP_HOST_DATA=
|
|
|
|
BIN_PATH=qemu-system-x86_64
|
|
USE_SUDO=false
|
|
ENABLE_SEV_SNP=false
|
|
|
|
ENABLE_KVM=true
|
|
|
|
MACHINE=q35
|
|
CPU=EPYC
|
|
SMP_COUNT=8
|
|
SMP_MAXCPUS=64
|
|
MEM_ID=ram1
|
|
|
|
KERNEL_HASH=false
|
|
|
|
NO_GRAPHIC=true
|
|
MONITOR=pty
|
|
HOST_FWD_RANGE=6100-6200
|
|
CERTS_MOUNT=/etc/cocos/certs
|
|
ENV_MOUNT=/etc/cocos/environment
|
|
|
|
COCOS_AGENT_VERSION=v0.3.1
|
|
|
|
#### Base image URL and names
|
|
BASE_IMAGE_URL=https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img
|
|
BASE_IMAGE=ubuntu-base.qcow2
|
|
CUSTOM_IMAGE=ubuntu-custom.qcow2
|
|
|
|
#### Paths for OVMF firmware
|
|
OVMF_CODE=/usr/share/ovmf/x64/OVMF_CODE.4m.fd
|
|
OVMF_VARS=/usr/share/ovmf/x64/OVMF_VARS.4m.fd
|
|
|
|
#### VM parameters
|
|
VM_NAME=cocos-vm
|
|
RAM=16G
|
|
DISK_SIZE=10G # Size for root filesystem
|
|
QEMU_BINARY=qemu-system-x86_64
|
|
|
|
AGENT_GRPC_SERVER_CERT=/etc/cocos/certs/server.pem
|
|
AGENT_GRPC_SERVER_KEY=/etc/cocos/certs/key.pem
|
|
AGENT_GRPC_SERVER_CA_CERTS=/etc/cocos/ca.pem
|
|
AGENT_GRPC_CLIENT_CA_CERTS=/etc/cocos/ca.pem
|