Skip to content

vngcloud/vks-bootstraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vks-bootstraper PyPI

The simple CLI tool to bootstrap instances of VKS workload clusters

Python


Installation

  • Install the vks-bootstraper:latest with pip tool:
    pip3 install --upgrade vks-bootstraper

Build

  • Install the Pip dependencies

    pip3 install --upgrade pip
    pip3 install --upgrade -r requirements.txt
    pip3 install --upgrade build twine
  • Build the CLI

    rm -rf dist
    python3 -m build
    twine check dist/*

    ...or to Binary:

    pyinstaller --onefile --paths=/home/$USER/anaconda3/envs/vks-bootstraper/lib/python3.10/site-packages:/home/$USER/anaconda3/envs/vks-bootstraper/lib/python310.zip:/home/$USER/anaconda3/envs/vks-bootstraper/lib/python3.10:/home/$USER/anaconda3/envs/vks-bootstraper/lib/python3.10/lib-dynload:/home/$USER/.local/lib/python3.10/site-packages ./vks-bootstraper.py
  • Publish the CLI to PyPi (make sure you have configured the $HOME/.pypirc config file, refer this section to pre-configure before performing this step)

    twine upload [--repository pypi] dist/*

Others

The .pypirc config file

  • The config file should be located at $HOME/.pypirc
  • The content of the file should be like this:
    [pypi]
      username = __token__
      password = pypi-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Usage

  • Run the CLI with the following command:
    vks-bootstraper --help
    ➜   vks-bootstraper --help             
    Usage: vks-bootstraper [OPTIONS] COMMAND [ARGS]...
    
    Options:
      --version  Show the version and exit.
      --help     Show this message and exit.
    
    Commands:
      add-host                 Add a new host to the /etc/hosts file
      generate-ssh-key         Generate the SSH key for the current instance
      get-instance-id          Get the vServer ID of the current instance
      get-local-ipv4           Get the local IPv4 of the current instance
      prepare-kubeadm-config   Prepare the kubeadm config file for the...
      waiting-instance-booted  Waiting for the instance to be booted up,...
      waiting-internet         Waiting for the instance to reach to the...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages