Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No native Docker support #100

Open
denismakogon opened this issue Jan 8, 2018 · 3 comments
Open

No native Docker support #100

denismakogon opened this issue Jan 8, 2018 · 3 comments

Comments

@denismakogon
Copy link

As it's said in README: 1000% satisfaction guaranteed when it's not. This type of installation does not work on Docker, Rkt, Kubernetes.
cfy_manager install script attempts to use sudo everytime it thinks of limited rights of the user that started this script.

On Fedora (on Docker):

cfy_manager install
Traceback (most recent call last):
  File ".bootstrap/_pex/pex.py", line 365, in execute
  File ".bootstrap/_pex/pex.py", line 293, in _wrap_coverage
  File ".bootstrap/_pex/pex.py", line 325, in _wrap_profiling
  File ".bootstrap/_pex/pex.py", line 408, in _execute
  File ".bootstrap/_pex/pex.py", line 466, in execute_entry
  File ".bootstrap/_pex/pex.py", line 471, in execute_module
  File "/usr/lib64/python2.7/runpy.py", line 192, in run_module
    fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/root/.pex/install/cloudify_manager_install-4.3.dev1-py2-none-any.whl.d089d836e39b543d4f63eef893a8462be0adbb41/cloudify_manager_install-4.3.dev1-py2-none-any.whl/cfy_manager/main.py", line 23, in <module>
    from .components import cli
  File "/root/.pex/install/cloudify_manager_install-4.3.dev1-py2-none-any.whl.d089d836e39b543d4f63eef893a8462be0adbb41/cloudify_manager_install-4.3.dev1-py2-none-any.whl/cfy_manager/components/cli/__init__.py", line 16, in <module>
    from .cli import install, configure, remove  # NOQA
  File "/root/.pex/install/cloudify_manager_install-4.3.dev1-py2-none-any.whl.d089d836e39b543d4f63eef893a8462be0adbb41/cloudify_manager_install-4.3.dev1-py2-none-any.whl/cfy_manager/components/cli/cli.py", line 23, in <module>
    from ...logger import get_logger
  File "/root/.pex/install/cloudify_manager_install-4.3.dev1-py2-none-any.whl.d089d836e39b543d4f63eef893a8462be0adbb41/cloudify_manager_install-4.3.dev1-py2-none-any.whl/cfy_manager/logger.py", line 122, in <module>
    _setup_logger()
  File "/root/.pex/install/cloudify_manager_install-4.3.dev1-py2-none-any.whl.d089d836e39b543d4f63eef893a8462be0adbb41/cloudify_manager_install-4.3.dev1-py2-none-any.whl/cfy_manager/logger.py", line 88, in _setup_logger
    _setup_file_logger(logger)
  File "/root/.pex/install/cloudify_manager_install-4.3.dev1-py2-none-any.whl.d089d836e39b543d4f63eef893a8462be0adbb41/cloudify_manager_install-4.3.dev1-py2-none-any.whl/cfy_manager/logger.py", line 113, in _setup_file_logger
    log_dir = _create_log_dir()
  File "/root/.pex/install/cloudify_manager_install-4.3.dev1-py2-none-any.whl.d089d836e39b543d4f63eef893a8462be0adbb41/cloudify_manager_install-4.3.dev1-py2-none-any.whl/cfy_manager/logger.py", line 105, in _create_log_dir
    check_output(['sudo', 'mkdir', '-p', log_dir])
  File "/usr/lib64/python2.7/subprocess.py", line 212, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1025, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

This particular error says that there's no sudo, but as root i don't need sudo. Moreover, Docker images don't have sudo, they run by default from the root.

@mcouthon
Copy link
Contributor

mcouthon commented Jan 9, 2018

Well, the usage of sudo was left in the code in order to support VMs as well as containers. The simple solution to your problem is to install sudo (yum install sudo).
You can see that docker is clearly supported by the fact that we actually install the manager on containers in our CI. Here's the Dockerfile that we use.
You would need a similar file in order for the installation to work.
You can see here the complete sequence we use to install on a container.

@denismakogon
Copy link
Author

Would be nice to have an in-tree Dockerfile that pulls does all stuff. Moreover, would be nice to have the docker-compose file that deploys distributed manager (not talking about HA mode that premium Cloudify supports).

@mcouthon
Copy link
Contributor

We didn't have a need for such a Dockerfile until now, but maybe in the future we'll do something like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants