ansible / ansible-container

DEPRECATED -- Ansible Container was a tool to build Docker images and orchestrate containers using only Ansible playbooks.
GNU Lesser General Public License v3.0
2.19k stars 392 forks source link

How to fully install ansible-container from sources? #498

Closed remyleone closed 7 years ago

remyleone commented 7 years ago
ISSUE TYPE
OS / ENVIRONMENT
$ ansible-container --debug version
Ansible Container, version 0.9.1rc0
Linux, sieben-inria, 4.4.0-66-generic, #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017, x86_64
3.5.2 (default, Nov 17 2016, 17:05:23) 
[GCC 5.4.0 20160609] /usr/bin/python3
{
  "NEventsListener": 0,
  "OperatingSystem": "Ubuntu 16.04.2 LTS",
  "Containers": 2,
  "SystemTime": "2017-05-04T15:09:54.736291919+02:00",
  "Plugins": {
    "Authorization": [],
    "Network": [
      "bridge",
      "host",
      "macvlan",
      "null",
      "overlay"
    ],
    "Volume": [
      "local"
    ]
  },
  "HttpProxy": "",
  "Swarm": {
    "ControlAvailable": false,
    "Nodes": 0,
    "RemoteManagers": null,
    "Error": "",
    "NodeID": "",
    "Cluster": {
      "Spec": {
        "Orchestration": {},
        "Raft": {
          "HeartbeatTick": 0,
          "ElectionTick": 0
        },
        "CAConfig": {},
        "TaskDefaults": {},
        "Dispatcher": {},
        "Labels": null,
        "EncryptionConfig": {
          "AutoLockManagers": false
        }
      },
      "UpdatedAt": "0001-01-01T00:00:00Z",
      "ID": "",
      "CreatedAt": "0001-01-01T00:00:00Z",
      "Version": {}
    },
    "Managers": 0,
    "NodeAddr": "",
    "LocalNodeState": "inactive"
  },
  "CpuCfsQuota": true,
  "Labels": null,
  "NGoroutines": 23,
  "KernelMemory": true,
  "BridgeNfIptables": true,
  "InitCommit": {
    "Expected": "949e6fa",
    "ID": "949e6fa"
  },
  "RuncCommit": {
    "Expected": "9c2d8d184e5da67c95d601382adf14862e4f2228",
    "ID": "9c2d8d184e5da67c95d601382adf14862e4f2228"
  },
  "LiveRestoreEnabled": false,
  "IPv4Forwarding": true,
  "NoProxy": "",
  "Debug": false,
  "SystemStatus": null,
  "CPUShares": true,
  "DriverStatus": [
    [
      "Root Dir",
      "/var/lib/docker/aufs"
    ],
    [
      "Backing Filesystem",
      "extfs"
    ],
    [
      "Dirs",
      "32"
    ],
    [
      "Dirperm1 Supported",
      "true"
    ]
  ],
  "CpuCfsPeriod": true,
  "LoggingDriver": "json-file",
  "ContainerdCommit": {
    "Expected": "422e31ce907fd9c3833a38d7b8fdd023e5a76e73",
    "ID": "422e31ce907fd9c3833a38d7b8fdd023e5a76e73"
  },
  "ServerVersion": "17.04.0-ce",
  "BridgeNfIp6tables": true,
  "Name": "sieben-inria",
  "HttpsProxy": "",
  "ID": "RVLU:5JQU:DJKY:KIAM:KYVI:55ZM:LECS:62NO:DC2O:4773:AMFC:CIN5",
  "Isolation": "",
  "KernelVersion": "4.4.0-66-generic",
  "NFd": 15,
  "SecurityOptions": [
    "name=apparmor",
    "name=seccomp,profile=default"
  ],
  "ContainersRunning": 0,
  "Images": 11,
  "NCPU": 4,
  "CPUSet": true,
  "SwapLimit": false,
  "CgroupDriver": "cgroupfs",
  "OSType": "linux",
  "IndexServerAddress": "https://index.docker.io/v1/",
  "Driver": "aufs",
  "ClusterStore": "",
  "ExperimentalBuild": false,
  "InitBinary": "",
  "Runtimes": {
    "runc": {
      "path": "docker-runc"
    }
  },
  "OomKillDisable": true,
  "ContainersPaused": 0,
  "MemoryLimit": true,
  "ClusterAdvertise": "",
  "MemTotal": 16695934976,
  "Architecture": "x86_64",
  "ContainersStopped": 2,
  "DockerRootDir": "/var/lib/docker",
  "DefaultRuntime": "runc",
  "RegistryConfig": {
    "IndexConfigs": {
      "docker.io": {
        "Name": "docker.io",
        "Secure": true,
        "Official": true,
        "Mirrors": []
      }
    },
    "Mirrors": [],
    "InsecureRegistryCIDRs": [
      "127.0.0.0/8"
    ]
  }
}
{
  "Os": "linux",
  "ApiVersion": "1.28",
  "Arch": "amd64",
  "GoVersion": "go1.7.5",
  "GitCommit": "4845c56",
  "Version": "17.04.0-ce",
  "MinAPIVersion": "1.12",
  "BuildTime": "2017-04-03T18:07:42.793330938+00:00",
  "KernelVersion": "4.4.0-66-generic"
}
SUMMARY

How could I fully install ansible-container using setup.py?

STEPS TO REPRODUCE

python3 setup.py install --user

EXPECTED RESULTS

I expected the command build to start working.

ACTUAL RESULTS
FileNotFoundError: [Errno 2] No such file or directory: '/home/sieben/.local/lib/python3.5/site-packages/ansible_container-0.9.1rc0-py3.5.egg/container/docker/files/setup.py'
kkoralsky commented 7 years ago

http://docs.ansible.com/ansible-container/installation.html#running-from-source

chouseknecht commented 7 years ago

@sieben

Thank you for using Ansible Container. We appreciate you taking the time to open an issue and share your feedback.

@kkoralsky is correct in pointing to the Running from Source guide. You can, of course, drop the -e option, and run the command as pip install .[docker,k8s,openshift], if you don't need the code to be editable.

I verified that it installs fine using Python 3 from a pyenv virtual environment.

Assuming we can close this. If you have additional questions, please feel free to re-open, or start a new issue.