-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert use of Vagrant to podman-compose for tests
Instead of Vagrant use ipalab-config and podman-compose. ipalab-config github action allows to automatically create FreeIPA environments using ansible-freeipa and run ansible playbooks against these environments. Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
- Loading branch information
Showing
4 changed files
with
131 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM registry.fedoraproject.org/fedora-toolbox:41 | ||
MAINTAINER [FreeIPA Developers freeipa-devel@lists.fedorahosted.org] | ||
ENV container=docker LANG=en_US.utf8 LANGUAGE=en_US.utf8 LC_ALL=en_US.utf8 | ||
|
||
RUN echo 'deltarpm = false' >> /etc/dnf/dnf.conf \ | ||
&& dnf update -y dnf \ | ||
&& dnf update -y python3 \ | ||
&& (sed -i 's/%_install_langs \(.*\)/\0:fr/g' /etc/rpm/macros.image-language-conf ||:) \ | ||
&& dnf install -y systemd \ | ||
&& dnf install -y \ | ||
git \ | ||
glibc-langpack-fr \ | ||
glibc-langpack-en \ | ||
iptables \ | ||
nss-tools \ | ||
openssh-server \ | ||
sudo \ | ||
wget \ | ||
freeipa-server \ | ||
freeipa-server-dns \ | ||
freeipa-server-trust-ad \ | ||
python3-libselinux \ | ||
firewalld \ | ||
nodejs \ | ||
&& dnf clean all \ | ||
&& sed -i 's/.*PermitRootLogin .*/#&/g' /etc/ssh/sshd_config \ | ||
&& echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config \ | ||
&& sed -i -e 's@^\(session.*required.*pam_loginuid\)@#\1@' /etc/pam.d/sshd \ | ||
&& systemctl enable sshd \ | ||
&& for i in /usr/lib/systemd/system/*-domainname.service; \ | ||
do sed -i 's#^ExecStart=/#ExecStart=-/#' $i ; done \ | ||
&& { systemctl mask firewalld ||: ; } \ | ||
&& { systemctl mask systemd-resolved ||: ; } \ | ||
&& systemctl set-default multi-user.target | ||
|
||
STOPSIGNAL RTMIN+3 | ||
VOLUME ["/usr/src/freeipa-webui", "/run", "/tmp"] | ||
ENTRYPOINT [ "/usr/sbin/init" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
lab_name: webui | ||
container_fqdn: true | ||
containerfiles: | ||
- containerfile-fedora | ||
network: ipa-webui | ||
subnet: "192.168.59.0/24" | ||
ipa_deployments: | ||
- name: webui | ||
domain: dom-server.ipa.demo | ||
realm: DOM-IPA.DEMO | ||
admin_password: Secret123 | ||
dm_password: Secret123 | ||
distro: containerfile-fedora | ||
cluster: | ||
servers: | ||
- name: server | ||
capabilities: | ||
- DNS | ||
- AD | ||
vars: | ||
ipaserver_netbios_name: DOM-SERVER | ||
ipaserver_idstart: 61000 | ||
ipaserver_idmax: 62000 | ||
ipaserver_rid_base: 63000 | ||
ipaserver_secondary_rid_base: 70000 | ||
volumes: | ||
- CONFIG_DIR:/usr/src/freeipa-webui:Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
- name: Set up Modern UI | ||
containers.podman.podman_container_exec: | ||
name: dom-server.ipa.demo | ||
command: | | ||
cat >> /etc/httpd/conf.d/ipa.conf <<EOF | ||
Alias /ipa/modern_ui "/usr/src/freeipa-webui/dist" | ||
<Directory "/usr/src/freeipa-webui/dist"> | ||
SetHandler None | ||
AllowOverride None | ||
Satisfy Any | ||
Require all granted | ||
RewriteEngine On | ||
RewriteRule ^(.*)/js/(.*)\\\\.(js|map)$ js/\\$2.\\$3 [L] | ||
RewriteRule ^(.*)/public/images/(.*)$ public/images/\\$2 [L] | ||
RewriteRule ^(.*)/(.*)\\\\.(css|ico|woff2)$ \\$2.\\$3 [L] | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule ^ index.html [QSA,L] | ||
</Directory> | ||
EOF | ||
systemctl restart httpd |