Skip to content

Docker support#249

Draft
AmozPay wants to merge 351 commits into
mainfrom
AmozPay-docker-support
Draft

Docker support#249
AmozPay wants to merge 351 commits into
mainfrom
AmozPay-docker-support

Conversation

@AmozPay
Copy link
Copy Markdown

@AmozPay AmozPay commented Oct 13, 2022

No description provided.

hoh added 30 commits June 16, 2021 11:15
Warning: Concurrent access to the same partition is not prevented
This should solve issues regarding concurrent access to the same partition
This prevents conflicts when running other software on the host.
…an their timeout (#63)

This refactors how VMs are managed to isolate the timeout and update logic.
hoh and others added 18 commits July 14, 2022 15:13
Due to a change in GitHub Actions
Changed to make a single command working for both Linux/macOs
This would have been the source of many duplicate asyncio tasks.
The custom type did not bring any value to the codebase.
Mutating the object being iterated caused inconsistency when iterating over subscribers.
The scheduling of persistent VMs requires external services to fetch
the available system resources of the host.

Solution: Add a new HTTP endpoint on `/about/usage/system`
that exposes system resources and system properties of
the host machine.
The traceback for these exceptions did not appear anywhere.

Solution: Introduce a new option that allows developers and operators to enable
asyncio debug mode.

Add helpers to run coroutines in tasks with exception catching and logging
and helps with spotting errors in coroutines.

Fixup
Clean-up multiple warnings without affecting the behaviour.
Feature: VMs could not be persisted

The supervisor only supported on request execution of
virtual machines.

This add support for an external scheduler to send a
list of VMs that should be started and persisted.

A temporary simple HTTP authentication method is
used to authenticate the scheduler, this is planned to move
to P2P messages from Core Channel Nodes.
We still support Ubuntu 20.04 that ships with Python 3.8.

Solution: Use a different typing annotation depending on the version of Python, making it easier to ditch the simpler annotation when Python 3.8 goes out of support.
Previously, 172.0.0.0/8 range was hardcoded to be used as the pool for which to assign IP addresses out of. As this was in violation of RFC1918, this needed to change. As this meant reworking the code anyway, it was changed so the range is configurable.
@hoh hoh changed the title Amoz pay docker support Docker support Oct 18, 2022
@hoh
Copy link
Copy Markdown
Member

hoh commented Oct 25, 2022

Can you rebase this branch on the latest master ?

@AmozPay AmozPay force-pushed the AmozPay-docker-support branch from d4985c9 to b916cbe Compare October 28, 2022 09:43
@AmozPay AmozPay force-pushed the AmozPay-docker-support branch from ba89f63 to a7227e9 Compare December 2, 2022 15:08
Copy link
Copy Markdown
Member

@hoh hoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch contains many experiments and duplicates.

Can you check what is still needed after the merge of #261 ?

When it makes sense, give the file a more appropriate name than _2.


/usr/sbin/dockerd 2>&1 | tee /log_docker.txt &

log "INIT 0 DONE2"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about a comment about Dockerd being started ?

-v "$(pwd)/firecracker:/opt/aleph-vm/firecracker:ro" \
--device /dev/kvm \
-p 4020:4020 \
alephim/vm-supervisor-dev $@
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we merge this in the main script or make it explicit that this is for Docker ?


WORKDIR /opt/aleph-vm

CMD "bash" No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What differs from the main Dockerfile ?

@@ -0,0 +1,3 @@
#!/bin/sh
docker image ls
docker run --rm -p 8080:8080 amozpay/hello_node No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename examples/docker_container ?

fi

echo DOCKER_COMMAND=$DOCKER_COMMAND

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

Comment thread vm_supervisor/storage.py
return Path(settings.FAKE_DATA_VOLUME)
for volume_bind in str(settings.FAKE_DATA_VOLUME).split(","):
if volume.mount == volume_bind.split(":")[1]:
return volume_bind.split(":")[0]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this change for ? Does it require a comment and a specific commit ?

@hoh hoh added the wip Work in progress... label Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wip Work in progress...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants