• 7
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

Ive have been looking for tutorials to help me understand it but my searches has been unsuccessful. so I was wondering if it is possible for a Saltstack Master to install packages, say apache-mysql-php, inside a docker container started inside a Saltstack Minion ?

The trick is initially setting up the master/minion keys and then later cleaning up those keys when the container is discarded.

I've seen setups where this is avoided by using salt-call locally. This involves injecting / sharing the salt states and pillar filesystem. Note that this kind of scenario ruins some of the benefits of the pillar system - each container will have a copy of the entire pillar instead of just its subset.

  • 0
Reply Report
      • 1
    • Yes. Docker is just a clever container manager - you can use the containers like any old system with only a few caveats. Even with "best practices" of exposing only one service per container you'll find that apt-get update && apt-get update -y is usually the first step in the Dockerfile.
      • 2
    • Indeed Docker is clever and I have done the same requirement with Ansible as configuration management tool. It was quite easy with ansible to spin up a docker image, install php-apache-mysql, transfer files without requiring a dockerfile to do any of that. The inbuilt functions in Ansible took care of it quite well. Similarly, I am wondering whether Saltstack can install packages prior/after deploying a containers in the minion. If you can provide a small example of say just installing apache in a container spun up in a salt minion, would be helpful. Any other examples are also welcomed. :)
      • 1
    • salt-call --local state.highstate No minion required. You might want to create a new question, perhaps marking this one answered?
      • 1
    • Isnt salt-call used to make master-less call from a minion ?? Even then it doesn't help my purpose, which is to install something in a container spun up in a minion by the master Saltstack. Everything has to happen from masterside. Im sorry, but I still don't have a clear answer for that yet.
      • 1
    • thanks for the reply. I have set up the master minion keys but i still remain doubtful if we can install packages onto the container, once it is up, using saltstack. Is there any other way to do it, like build an image and then run the container ? is that possible ?

Trending Tags