How to re-run cloud-init without reboot

While re-running all of cloud-init without reboot isn’t a recommended approach, the following commands will allow you to accomplish this on a system. The commands have been updated so to re-run you need to clean out the existing config: sudo cloud-init clean –logs cloud-init typically runs multiple boot stages in order due to systemd service … Read more

Login credentials of Ubuntu Cloud server image

18.04 setup step-by-step with cloud-localds In short you need on the host: sudo apt-get install cloud-image-utils cat >user-data <<EOF #cloud-config password: asdfqwer chpasswd: { expire: False } ssh_pwauth: True EOF cloud-localds user-data.img user-data # user-data.img MUST come after the rootfs. qemu-system-x86_64 \ -drive file=ubuntu-18.04-server-cloudimg-amd64.img,format=qcow2 \ -drive file=user-data.img,format=raw \ -m 1G … and now you can … Read more

installing python packages without internet and using source code as .tar.gz and .whl

This is how I handle this case: On the machine where I have access to Internet: mkdir keystone-deps pip download python-keystoneclient -d “/home/aviuser/keystone-deps” tar cvfz keystone-deps.tgz keystone-deps Then move the tar file to the destination machine that does not have Internet access and perform the following: tar xvfz keystone-deps.tgz cd keystone-deps pip install python_keystoneclient-2.3.1-py2.py3-none-any.whl -f … Read more

What’s the difference between setup.py and setup.cfg in python projects

Traditionally, setup.py has been used to build a Python package, i.e., python setup.py build Like any old Python file, setup.py can contain lots of code. In most cases, however, it is purely declarative and simply lists package properties, e.g., from setuptools import setup setup( name=”foobar”, version=”0.1.0″, author=”John Doe”, # … ) In fact, some consider … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)