Self Nas Environment Project

This artcle is a note for myself to build a private NAS station using Ubuntu 20.04. The main usage of my NAS is to store photoes. For other services, run webmin to control machine via WebUI, and run Emby/ Jellyfin for multi media. Above 2 will run in docker so I also run portainer to manage them. Overview Use Samba to share storage, and use PhotoSync to upload photoes from

Multipass Launch Failed by Network Timeout

Multipass is a very useful tools to create Ubuntu VM instance. It will provides a CLI to launch and manage the Linux instances. The downloading of a cloud image is also automatically, and a VM can be up and running within minutes. But in my case, I tried multipass 1.1.0 to quick launch an instance, but it failed with a Network timeout error. 1 2 3 4 5 6 $ multipass version multipass 1.

Moving From Hexo to Hugo

HexoからHugoに 今までHexoでブログを書いたが、Golang勉強のついでにHugoに移しました。 理由はいろいろありますが、主な点は以

ASRock Fatal1ty B450 Gaming-ITX 'Restore on AC/Power Loss' not working

I have a ASRock Fatal1ty B450 Gaming-ITX with the latest BIOS 3.40. As I want to power it on remotely, In Bios setting I enabled ‘Restore on AC/Power Loss’ option on BIOS, but it's not working. Then I found below and upgrade my bios firmware to 3.53, and everything works just fine! You can find the v3.53 on below link.

connect to wifi in Linux via nmcli command

I will use nmcli to do this task. First you need to install network-manager package, and start the Daemon 1 2 $ sudo apt install network-manager $ sudo systemctl start NetworkManager Then let's check the network interface status by below command 1 2 3 4 5 6 7 $ nmcli dev status DEVICE TYPE STATE CONNECTION wlp2s0 wifi connected xibuka-wifi-5G enp0s31f6 ethernet connected netplan-enp0s31f6 p2p-dev-wlp2s0 wifi-p2p disconnected -- eth0 ethernet unavailable -- lo loopback unmanaged -- Next step is to check the available Wifi access points.

The begining of bash script

exit script immediately when a command fails 1 2 set -o errexit set -e output error and exit script immediately when refer to a undefine variable. 1 2 set -o nounset set -u exit script even a command fails before a pipe 1 set -o pipefail

OpenStack frequently used command

OpenStack frequently used command OpenStack Compute - Nova list instances nova list openstack server list list/check flavor nova flavor-list nova flavor-show <name or ID> openstack flavor list openstack flavor show <name or ID> create flavor openstack flavor create --ram <ram> --vcpus <cpu number> --disk <size> --id <id> <name> nova flavor-create <name> <id> <ram> <disk> <vcpus> launch an instance nova boot <name> --image <image> --flavor <flavor> openstack server create --flavor <flavor> --image <image> <name> launch an instance with network openstack server create --flavor <flavor> --image <image> <name> net-id=<network> launch an instance with key-pair nova boot <name> --image <image> --flavor <flavor> --key-name <key-pair name> openstack server create --flavor <flavor> --image <image> <name> access instance via router ip netns list sudo ip netns exec <qrouter-id> ssh -i <key> [email protected] launch an instance with custom port nova boot --image <image> --flavor <flavor> --nic port-id=<port-id> <instance name> delete an instance nova delete <ID> openstack server delete <ID or name> Openstack Network - Neutron list network openstack network list list subnetwork openstack subnet list --long create a network openstack network create <net name> create a subnetwork openstack subnet create <subnet name> --network <net name> --subnet-range <ip address>/<prefix> --gateway <gw ip> --allocation-pool start=IP_ADDR,end=IP_ADDR e.

Certified Kubernetes Administrator (CKA) learning note

Install Install 1 apt install If you install docker with other cgroup driver, you have to make sure that docker and Kubernetes will use same cgroup driver. 1 2 3 4 5 cat << EOF >> /etc/docker/daemon.json { "exec-opts": ["native.cgroupdriver=systemd"] } EOF install apt key and source to system 1 2 3 4 5 [email protected]:~# curl -s https://packages.

[Juju] Use juju to deploy minecraft server in LXD

Juju is a deploy tool which supports a very wide range of cloud providers, like AWS, Azure, Google Cloud Platform, MAAS and LXD. This artcle will focus on how to build an OpenStack test environment using Juju and LXD. installing LXD It is very easy to install LXD, just run below command 1 $ sudo apt-install lxd If you can't find lxd package, run below command to add PPA(Personal Package Archive) to find LXD package.