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

fix pipeline for slides #218

Merged
merged 4 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build-slides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build-slides-stg:
runs-on: ubuntu-latest
steps:
-
-
name: Checkout
uses: actions/checkout@v3
with:
Expand All @@ -22,13 +22,13 @@ jobs:
uses: docker/setup-buildx-action@v2
-
name: Login to Quay.io Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_TOKEN }}
-
name: Build Slides
-
name: Build Slides
uses: docker/build-push-action@v3
with:
context: .
Expand All @@ -55,12 +55,12 @@ jobs:
with:
name: trivy-results-build
path: trivy-results.txt
-
-
name: Install Kubectl
uses: azure/setup-kubectl@v3
with:
version: v1.21.2
-
-
name: Deploy RevealJS Stg
env:
TRAINING_NAMESPACE: 'pitc-ansible-training-stg'
Expand Down
13 changes: 3 additions & 10 deletions slides/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,18 @@ ENV NPM_CONFIG_CACHE=/tmp/.npm

WORKDIR /app

RUN --mount=type=secret,id=gitlab_pullsecret PULLSECRET=$(cat /run/secrets/gitlab_pullsecret) \
&& git clone https://github.com/hakimel/reveal.js.git reveal \
&& git clone https://:${PULLSECRET}@gitlab.puzzle.ch/pitc_members/pitc-revealjs-theme.git puzzle-theme \
&& mv puzzle-theme/css/theme/puzzle.css reveal/css/theme/ \
&& mv puzzle-theme/css/theme/source/puzzle.scss reveal/css/theme/source/ \
&& mv puzzle-theme/css/theme/source/puzzle-imgs reveal/css/theme/source/ \
&& rm -rf puzzle-theme \
&& rm -rf reveal/.git/
RUN git clone https://github.com/hakimel/reveal.js.git reveal

WORKDIR reveal

COPY slides/ansible-techlab ./ansible-techlab
COPY slides/index.html.patch .

RUN patch --forward --strip=1 index.html --input=index.html.patch \
&& npm install && npm run build -- css-themes
&& npm install

RUN chgrp -R 0 ${NPM_CONFIG_CACHE} \
&& chmod -R g=u ${NPM_CONFIG_CACHE}

EXPOSE 8000
CMD ["npm", "start", "--", "--host=0.0.0.0"]
43 changes: 21 additions & 22 deletions slides/ansible-techlab/puzzle-demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

### ansible.puzzle.ch

<!-- #### Lukas Grimm -->
#### Lukas Grimm

<!-- #### Dominik Meisser -->

#### Lukas Preisig
<!-- #### Lukas Preisig -->

<!-- #### Philippe Schmid -->

Expand All @@ -16,7 +16,7 @@

<!-- #### Mark Pröhl -->

#### Florian Studer
<!-- #### Florian Studer -->

<!-- .slide: class="master-cover" -->

Expand All @@ -27,7 +27,7 @@
<!--
<div class="people" style="color: black;">
<div>
<div class="img" style="background-image: url(https://www.puzzle.ch/wp-content/uploads/2019/06/Schmid_Philippe-3-400x300.jpg)" />
<div class="img" style="background-image: url(https://www.puzzle.ch/img/2024/06/Schmid_Philippe.jpg?w=900&h=900&fit=crop&fm=webp&q=90&sharp=4&s=f27e83a00061d8aa6266f3092b1b289c)" />
</div>

### Philippe Schmid
Expand All @@ -38,18 +38,12 @@

-->

<!--
<div class="people" style="color: black;">
<div>
<div class="img" style="background-image: url(https://www.puzzle.ch/wp-content/uploads/2020/08/Lukas_Grimm_wp-400x300.jpg)" />
</div>
![](https://www.puzzle.ch/img/2024/06/Grimm_Lukas.jpg?w=300&h=300&fit=crop&fm=webp&q=90&sharp=4&s=d42398d9832aa48066cb50daa8a895d6)

### Lukas Grimm
System Engineer
Lead System Architect

[email protected]
</div>
-->

<!--
<div class="people">
Expand All @@ -64,7 +58,7 @@
</div>

-->

<!--
<div class="people" style="color: black;">
<div>
<div class="img" style="background-image: url(https://www.puzzle.ch/wp-content/uploads/2019/05/Preisig_Lukas-400x300.jpg)" />
Expand All @@ -75,7 +69,7 @@

[email protected]
</div>

-->
<!--
<div>
<div class="img" style="background-image: url(https://www.puzzle.ch/wp-content/uploads/2018/08/Test-Remy-Keil-Filter_2Option-400x300.jpg)" />
Expand Down Expand Up @@ -126,7 +120,7 @@ [email protected]
</div>

-->

<!--
<div>
<div class="img" style="background-image: url(https://www.puzzle.ch/wp-content/uploads/2021/06/Florian_Studer_wp-400x300.jpg)" />
</div>
Expand All @@ -138,22 +132,17 @@ [email protected]

</div>


-->
<!-- .slide: class="master-top-head" -->

***
## Alle Puzzler

<div class="people" style="color: black;">
<div>
<div class="img" style="background-image: url(https://www.puzzle.ch/wp-content/uploads/2021/06/2006-1024.png)" />
</div>
![](https://www.puzzle.ch/img/2024/06/2024_Gruppenfoto_Puzzle-16x9-1000px-Breit.jpg?w=1000&h=561&fit=crop&fm=webp&q=90&sharp=4&s=5ec79746d78173920f663ca911d9ce86)"

### Members
https://www.puzzle.ch/de/team

</div>

<!-- .slide: class="master-top-head" -->

***
Expand Down Expand Up @@ -783,13 +772,15 @@ Ein Play ist was, wo wie, gmacht wird
"Baby-JSON" possible

same as before:

```yaml
---
- hosts: web
tasks:
- name: install httpd
yum: name=httpd state=installed
```

Not Best Practice!
<!-- .slide: class="master-content" > -->

Expand Down Expand Up @@ -848,6 +839,7 @@ Why? Where to define variables?
***
## Where to put variables
defined in playbook:

```yaml
---
- hosts: web
Expand All @@ -860,12 +852,14 @@ defined in playbook:
name: "{{ my_package }}"
state: installed
```

<!-- .slide: class="master-content" > -->

***
## Where to put variables

`ansible-playbook myplay.yml --extra-vars my_package="nginx"`

<!-- .slide: class="master-content" > -->

Note:
Expand Down Expand Up @@ -933,6 +927,7 @@ https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#unde
Don't Name your Variables after Magic Variables

***

## Bonus Level: Loops!
```yaml
- name: start and enable two services
Expand All @@ -951,11 +946,15 @@ Note:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html#migrating-to-loop

<!-- .slide: class="master-content" > -->

***

# Lab 4.1: Ansible Playbooks - Variables and Loops

<!-- .slide: class="master-title" > -->

***

## Templates

- "template" is a module
Expand Down
4 changes: 2 additions & 2 deletions slides/index.html.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--- index_orig.html 2021-10-27 21:22:24.221941946 +0200
+++ index.html 2021-10-27 21:07:05.583077961 +0200
@@ -8,17 +8,20 @@

<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
- <link rel="stylesheet" href="dist/theme/black.css">
+ <link rel="stylesheet" href="dist/theme/puzzle.css" id="theme">
+ <link rel="stylesheet" href="https://puzzle.github.io/pitc-revealjs-theme/2.2.0/puzzle.css" id="theme">

<!-- Theme used for syntax highlighted code -->
- <link rel="stylesheet" href="plugin/highlight/monokai.css">
Expand Down
Loading