Manage docker containers inside openstack instances via python API

asked 2018-12-14 15:17:10 -0500

najeh gravatar image

After docker installation inside openstack instance and creation of conatiners and deployment of a system inside the container.

I need to manage docker containers resides on the openstack instance. But i don't know how can process that.

I installed docker library and i tried to access the instance using python API using this code:

import paramiko, sys, getpass

hostname = '192.168.x.x'

username = 'ubuntu'

password = 'password'

ssh = paramiko.SSHClient()

ssh.connect(hostname=hostname, username=username, password=password)

I failed to connect to the instance

How can i resolv this ?

edit retag flag offensive close merge delete

Comments

1

You start by entering the error message into a search engine and select the results that best fit your problem.

Also, the sample programs I have seen include a call to set_missing_host_key_policy(). Perhaps that’s required?

Bernd Bausch gravatar imageBernd Bausch ( 2018-12-14 17:24:19 -0500 )edit

@Bernd Baush i connect to the instance but i don't know how can i manage the system deployed under the instance with docker or without?

najeh gravatar imagenajeh ( 2018-12-24 17:52:58 -0500 )edit
1

That depends on the system you deploy. I can’t tell you how to manage a system if I don’t know which system.

To manage Docker, use docker.

Bernd Bausch gravatar imageBernd Bausch ( 2018-12-24 18:15:23 -0500 )edit

i know how to use and manage docker but i don't know how access the docker container inside the instance, this is my problem.

najeh gravatar imagenajeh ( 2018-12-24 18:45:27 -0500 )edit

To access the container, either use the console via the docker tool, or use its IP address. Since I don't know your Docker networking setup, it's hard to give you advice, but often this is done by publishing ports.

Bernd Bausch gravatar imageBernd Bausch ( 2018-12-24 21:33:35 -0500 )edit