A command called cmsd and foo for the cloudmesh shell
Project description
Cloudmesh cmsd
Cloudmesh cmsd is a command to run cloudmesh in a container regardles of the OS. Thus it is extreemly easy to install and use.
cmsd will however use locally installed keys in ~/.ssh
and cloud
configurations stored in ~/.cloudmesh/cloudmesh.yaml
. The yaml file
will be created upon first call of cmsd if it is not available.
How to use cmsd
Important. You must have cms in debug off mode. to use the cmsd command
cms debug off
Prerequesites
- Docker
- python 3.8 or newer
- We strongle recommended to use a python virtual environment
- Install cloudmesh-installer by following the documentation in the Cloudmesh manual
cmsd installation
- Activate the python virtual environment
- Clone
cloundmesh-cmsd
repository to a directory of your preference (~\cm
is recommended to use)
> cloudmesh-installer git clone cmsd
- Install cloudmesh-cmsd using cloudmesh-installer
> cloudmesh-installer install cmsd
- Check if the installation succeded
> cmsd --help
cmsd setup
- To run cmsd, you would need a configuration directory that is mounted into the container.
Let us call this
CLOUDMESH_CONFIG_DIR
. SetCLOUDMESH_CONFIG_DIR
as an environment variable.
For Unix:
> export CLOUDMESH_CONFIG_DIR=<path to CLOUDMESH_HOME_DIR>
For Windows:
> set CLOUDMESH_CONFIG_DIR=<path to CLOUDMESH_HOME_DIR>
NOTE:
CLOUDMESH_CONFIG_DIR
path must not have in any spaces.- Clarification for Windows users:
- For example
C:\.cloudmesh
will work, so doesC:\Users\gregor\.cloudmesh
, but notC:\Users\gregor von Laszewski\.cloudmesh
)- Make sure that the drive of the
CLOUDMESH_CONFIG_DIR
is granted file access in Docker settings
- Run setup. If you are running setup on an empty
CLOUDMESH_CONFIG_DIR
, you will be asked to key in some details that are required for the setup, such as profile details, Mongo DB credentials, etc.
> cmsd --setup
- Run the following command to see if the
cloudmesh-cms-container
is running! Additionally, checkCLOUDMESH_CONFIG_DIR
contains thecloudmesh.yaml
file.
> cmsd --ps
- Run the following to verify if the configurations you entered have been
properly reflected in the
cloudmesh.yaml
file.
> cmsd config cat
cmsd usages
- To stop the containers, use
cmsd --stop
. - To start/restart the containers, use
cmsd --start
. - To clean the containers (remove stopped containers), use
cmsd --clean
. - To log into the running
cloudmesh-cms-container
, usecmsd --shell
.
MongoDB and Mongo client connections
cmsd is running an official MongoDB container from Docker Hub. Refer here.
Mongo server container is bound to 127.0.0.1:27071
port. Therefore you can use
any Mongo client to explore the database by connecting to this port.
Example usecase - Creating a vm in AWS
-
Create an AWS account and add the authentication information in the
CLOUDMESH_HOME_DIR/cloudmesh.yaml
file. Refer Cloudmesh Manual - AWS -
Set cloud to
aws
> cmsd set cloud=aws
- Set AWS key name
> cmsd set key=<key name>
- Boot a vm with the default config
> cmsd vm boot
End user deployment
Please uese a python virtualenv as to not interfere with your system python. Activate your python venv. Next just call
pip install cloudmesh-cmsd
This will install a command cmsd
in your environment that you can use
as in place replacement for the cms command.
The containers are called
cloudmesh/cms
cloudmesh/mongo
Manual Page
Usage:
cmsd --help
cmsd --setup
cmsd --clean
cmsd --version
cmsd --update
cmsd --start
cmsd --stop
cmsd --ps
cmsd --gui
cmsd --shell
cmsd COMMAND... [--refresh]
cmsd
This command passes the arguments to a docker container
that runs cloudmesh.
Arguments:
COMMAND the commands we bass along
Description:
cmsd --help
prints this manual page
cmsd --setup
downloads the source distribution, installs the image locally
cmsd --clean
removes the container form docker
cmsd --version
prints out the verison of cmsd and the version of the container
cmsd --gui
runs cloudmesh gui on the docker container
cmsd --update
gets a new container form dockerhub
cmsd COMMAND
The command will be executed within the container, just as in
case of cms.
cmsd
When no command is specified cms will be run in interactive
mode.
Developer Source install
For developers it can be installed in an easy fashion with
mkdir cm
cd cm
pip install cloudmesh-installer -U
cloudmesh-installer git clone cmsd
cloudmesh-installer git install cmsd
Now you can use the command
cmsd help
The source code is contained in
cloudmesh-cmsd
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cloudmesh_cmsd-4.2.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 725d207cd0cae9ee7a2aca1c2b10132709078dbbf4652095e8fce293d1132bf0 |
|
MD5 | 13ead61f8ffdb8c88b5885edbcb32cab |
|
BLAKE2b-256 | 8d3e0930bb68ad909dceaecba4cff95d53ce27cbd6d092c47874a449cdd8423c |