Skip to content

Instantly share code, notes, and snippets.

## set up a Focal machine, installed charmcraft, node and unzip
facundo@antorcha:~$ lxc launch ubuntu:20.04 test-weirdsubproc
Creating test-weirdsubproc
Starting test-weirdsubproc
facundo@antorcha:~$ lxc exec test-weirdsubproc -- /bin/bash
root@test-weirdsubproc:~# snap install charmcraft --classic
charmcraft 1.2.1 from Canonical✓ installed
root@test-weirdsubproc:~# snap install node --classic --channel 12/stable
node (12/stable) 12.22.7 from OpenJS Foundation (iojs✓) installed
================================== FAILURES ===================================
______________________________ test_create_venv _______________________________
tmp_path = WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_create_venv0')
def test_create_venv(tmp_path):
"""Test to show that venv.create doesn't work in Github Actions."""
import venv
> venv.create(str(tmp_path), with_pip=True)

Using charmcraft to build, upload and release charms

Through this tutorial we'll see the whole process of publishing a charm: building it, uploading it to the store, and releasing it.

For simplicity we start by having a ready-to-build charm. If you want to start from a previous step, please check this other tutorial on how to build a charm using modern tools.

FIXME: build the structure, remember to include a version.txt file!!!!! FIXME: show the structure!!!

Let's do it!

Using charmcraft to build, upload and release charms

Through this tutorial we'll see the whole process of publishing a charm: building it, uploading it to the store, and releasing it.

For simplicity we start by having a ready-to-build charm. If you want to start from a previous step, please check this other tutorial on how to build a charm using modern tools.

$ ll
total 16
-rw-rw-r-- 1 facundo facundo  180 jul 23 13:27 metadata.yaml
@facundobatista
facundobatista / gist:74619d7c91de6b6a3c3c6facf56148a1
Created July 23, 2020 12:40
Using charmcraft to build, upload and release charms
# Using charmcraft to build, upload and release charms
Through this tutorial we'll see the whole process of publishing a charm: building it, uploading it to the store, and releasing it.
For simplicity we start by having a ready-to-build charm. If you want to start from a previous step, please check this other tutorial on [how to build a charm using modern tools](https://discourse.juju.is/t/how-to-build-a-charm-using-modern-tools/3246).
FIXME: build the structure, remember to include a version.txt file!!!!!
FIXME: show the structure!!!
## Let's do it!
*** fades *** 2020-04-21 23:17:51,968 fades INFO Hi! This is fades 8.1, automatically managing your dependencies
*** fades *** 2020-04-21 23:17:51,968 fades DEBUG Running Python sys.version_info(major=3, minor=6, micro=9, releaselevel='final', serial=0) on 'Linux-4.15.0-96-generic-x86_64-with-Ubuntu-18.04-bionic'
*** fades *** 2020-04-21 23:17:51,968 fades DEBUG Starting fades v. 8.1
*** fades *** 2020-04-21 23:17:51,969 fades DEBUG Arguments: Namespace(check_updates=False, child_options=[], child_program=None, clean_unused_venvs=None, dependency=['requests'], executable=False, get_venv_dir=True, ipython=False, no_precheck_availability=False, pip_options=[], python=None, python_options=[], quiet=False, remove=None, requirement=None, system_site_packages=False, verbose=True, version=False, virtualenv_options=[])
*** fades *** 2020-04-21 23:17:51,970 fades.helpers DEBUG Using last resort base dir: ~/.fades
*** fades *** 2020-04-
#--------------------- game.py
#--------------------- header.py
instrucciones = [
"You are the memory allocator: your job is to place code segments in RAM",
"Place the segments before the user loses her patience",
"Use space or right click to rotate memory segments",
"The score will increase as you optimize the space by making rectangular areas",
"When a segment is not yet optimized you can still move it",
"You get higher scores if your areas are more 'square'",
"When a memory segment is no longer needed it will be released by the GC",
*** fades *** 2020-01-23 12:18:05,735 fades INFO Hi! This is fades 8.1, automatically managing your dependencies
*** fades *** 2020-01-23 12:18:05,735 fades DEBUG Running Python sys.version_info(major=3, minor=6, micro=9, releaselevel='final', serial=0) on 'Linux-4.15.0-72-generic-x86_64-with-neon-18.04-bionic'
*** fades *** 2020-01-23 12:18:05,735 fades DEBUG Starting fades v. 8.1
*** fades *** 2020-01-23 12:18:05,736 fades DEBUG Arguments: Namespace(check_updates=False, child_options=[], child_program='pipdeptree', clean_unused_venvs=None, dependency=['pipdeptree'], executable=True, get_venv_dir=False, ipython=False, no_precheck_availability=False, pip_options=[], python=None, python_options=[], quiet=False, remove=None, requirement=['requirements.txt'], system_site_packages=False, verbose=True, version=False, virtualenv_options=[])
*** fades *** 2020-01-23 12:18:05,736 fades.cache DEBUG Using cache index: '/home/facundo/.l
*** fades *** 2020-01-23 11:36:34,561 fades INFO Hi! This is fades 8.1, automatically managing your dependencies
*** fades *** 2020-01-23 11:36:34,561 fades DEBUG Running Python sys.version_info(major=3, minor=6, micro=9, releaselevel='final', serial=0) on 'Linux-4.15.0-72-generic-x86_64-with-neon-18.04-bionic'
*** fades *** 2020-01-23 11:36:34,561 fades DEBUG Starting fades v. 8.1
*** fades *** 2020-01-23 11:36:34,562 fades DEBUG Arguments: Namespace(check_updates=False, child_options=[], child_program='pipdeptree', clean_unused_venvs=None, dependency=['pipdeptree'], executable=True, get_venv_dir=False, ipython=False, no_precheck_availability=False, pip_options=[], python=None, python_options=[], quiet=False, remove=None, requirement=['requirements.txt'], system_site_packages=False, verbose=True, version=False, virtualenv_options=[])
*** fades *** 2020-01-23 11:36:34,562 fades.cache DEBUG Using cache index: '/home/facundo/.l
17:04:45|facundo@blackfx:~/devel/reps/asoc_members (upload-gdrive-invoices *)$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
postgres latest 7363c5bcdbce 5 weeks ago 394MB
alpine/helm 2.15.2 cdbaf7fd444b 2 months ago 44.9MB
debian bullseye 7cf8ce571a2a 2 months ago 116MB
python 3.8-rc-stretch 56ff6e6d3ddd 7 months ago 936MB
python 3.6 d6b15f660ce8 10 months ago 924MB
mailhog/mailhog latest e00a21e210f9 14 months ago 19.2MB
17:04:47|facundo@blackfx:~/devel/reps/asoc_members (upload-gdrive-invoices *)$ make clean-dev
docker-compose down