summaryrefslogtreecommitdiff
path: root/docker/ironic/ironic-conductor/Dockerfile.j2
blob: 096452b64f9bbdc7d20d3cbc93cdedf8bb1e89bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
FROM {{ namespace }}/{{ image_prefix }}ironic-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"

{% block ironic_conductor_header %}{% endblock %}

{% import "macros.j2" as macros with context %}

{% if install_type == 'binary' %}
    {% if base_package_type == 'rpm' %}
        # TODO(Jeffrey4l): no python-oneviewclient
        {% set ironic_conductor_packages = [
            'dosfstools',
            'e2fsprogs',
            'gdisk',
            'ipmitool',
            'openssh-clients',
            'openstack-ironic-conductor',
            'openstack-ironic-staging-drivers',
            'parted',
            'psmisc',
            'util-linux',
            'xfsprogs'
        ] %}

        # FIXME(mgoddard): Removed shellinabox which is not currently provided
        # by EPEL8.
        {% if distro_python_version.startswith('3') %}
        {% set ironic_conductor_packages = ironic_conductor_packages + [
            'python3dist\(ansible\)',
            'python3-dracclient',
            'python3-ironic-inspector-client',
            'python3-proliantutils',
            'python3-pysnmp',
            'python3-scciclient',
            'python3-sushy',
            'python3-systemd'
        ] %}
        {% else %}
        {% set ironic_conductor_packages = ironic_conductor_packages + [
            'ansible',
            'pysnmp',
            'python-UcsSdk',
            'python-dracclient',
            'python-ironic-inspector-client',
            'python-proliantutils',
            'python-scciclient',
            'python-sushy',
            'python2-ImcSdk',
            'shellinabox',
            'systemd-python'
        ] %}
        {% endif %}
        {% if distro_package_manager == 'dnf' or base_distro not in ['centos'] %}
            {% set ironic_conductor_packages = ironic_conductor_packages + [
                'qemu-img'
            ] %}
        {% else %}
            {% set ironic_conductor_packages = ironic_conductor_packages + [
                'qemu-img-ev'
            ] %}
        {% endif %}
    {% elif base_package_type == 'deb' %}
        # TODO(jeffrey4l): no python-dracclient, python-oneviewclient, UcsSdk,
        # ImcSdk package, python-sushy, ironic-staging-drivers
        {% set ironic_conductor_packages = [
            'ansible',
            'bsdmainutils',
            'dosfstools',
            'e2fsprogs',
            'gdisk',
            'ipmitool',
            'ironic-conductor',
            'openssh-client',
            'parted',
            'psmisc',
            'python3-ironic-inspector-client',
            'python3-proliantutils',
            'python3-pysnmp4',
            'python3-scciclient',
            'python3-systemd',
            'qemu-utils',
            'shellinabox',
            'udev',
            'xfsprogs',
        ] %}
    {% endif %}
{% elif install_type == 'source' %}
    {% if base_package_type == 'rpm' %}
        {% set ironic_conductor_packages = [
            'dosfstools',
            'e2fsprogs',
            'fuse',
            'gdisk',
            'ipmitool',
            'openssh-clients',
            'parted',
            'psmisc',
            'util-linux',
            'xfsprogs',
        ] %}
        # FIXME(mgoddard): Removed shellinabox which is not currently provided
        # by EPEL8.
        {% if distro_python_version.startswith('3') %}
        {% set ironic_conductor_packages = ironic_conductor_packages + [
            'python3-systemd',
            'systemd-udev',
        ] %}
        {% else %}
        {% set ironic_conductor_packages = ironic_conductor_packages + [
            'shellinabox',
            'systemd-python',
            'systemd',
        ] %}
        {% endif %}
        {% if distro_package_manager == 'dnf' or base_distro not in ['centos'] %}
            {% set ironic_conductor_packages = ironic_conductor_packages + [
                'qemu-img'
            ] %}
        {% else %}
            {% set ironic_conductor_packages = ironic_conductor_packages + [
                'qemu-img-ev'
            ] %}
        {% endif %}
    {% elif base_package_type == 'deb' %}
        {% set ironic_conductor_packages = [
            'bsdmainutils',
            'dosfstools',
            'e2fsprogs',
            'gdisk',
            'ipmitool',
            'openssh-client',
            'parted',
            'psmisc',
            'python3-systemd',
            'qemu-utils',
            'shellinabox',
            'udev',
            'xfsprogs',
        ] %}
    {% endif %}

{% set ironic_conductor_pip_packages = [
    '-r /ironic/driver-requirements.txt',
    'ironic-staging-drivers',
] %}

RUN {{ macros.install_pip(ironic_conductor_pip_packages | customizable("pip_packages")) }}
{% endif %}

{{ macros.install_packages(ironic_conductor_packages | customizable("packages")) }}

{% block ironic_conductor_footer %}{% endblock %}
{% block footer %}{% endblock %}

USER ironic