Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Working with Workspace
Search
Oliver Davies
February 02, 2021
Technology
0
830
Working with Workspace
https://www.oliverdavies.uk/talks/working-with-workspace
Oliver Davies
February 02, 2021
Tweet
Share
More Decks by Oliver Davies
See All by Oliver Davies
Building Static Websites with Sculpin
opdavies
0
1.7k
Taking Flight with Tailwind CSS
opdavies
0
5.3k
TDD - Test Driven Drupal
opdavies
0
4.1k
Building "Build Configs"
opdavies
0
490
Communities and contribution
opdavies
0
240
Working without Workspace
opdavies
0
290
Things you should know about PHP
opdavies
1
830
An Introduction to Mob Programming
opdavies
0
340
Deploying PHP applications with Ansible, Ansible Vault and Ansistrano
opdavies
0
6.4k
Other Decks in Technology
See All in Technology
実装で解き明かす並行処理の歴史
zozotech
PRO
1
330
GC25 Recap+: Advancing Go Garbage Collection with Green Tea
logica0419
1
410
20250929_QaaS_vol20
mura_shin
0
110
AI時代だからこそ考える、僕らが本当につくりたいスクラムチーム / A Scrum Team we really want to create in this AI era
takaking22
6
3.4k
SREとソフトウェア開発者の合同チームはどのようにS3のコストを削減したか?
muziyoshiz
1
100
コンテキストエンジニアリングとは? 考え方と応用方法
findy_eventslides
4
900
LLMアプリケーション開発におけるセキュリティリスクと対策 / LLM Application Security
flatt_security
7
1.9k
多様な事業ドメインのクリエイターへ 価値を届けるための営みについて
massyuu
0
110
AI ReadyなData PlatformとしてのAutonomous Databaseアップデート
oracle4engineer
PRO
0
180
SwiftUIのGeometryReaderとScrollViewを基礎から応用まで学び直す:設計と活用事例
fumiyasac0921
0
140
From Prompt to Product @ How to Web 2025, Bucharest, Romania
janwerner
0
120
Escaping_the_Kraken_-_October_2025.pdf
mdalmijn
0
130
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
95
14k
Writing Fast Ruby
sferik
629
62k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.7k
A Tale of Four Properties
chriscoyier
160
23k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
How to Think Like a Performance Engineer
csswizardry
27
2k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
For a Future-Friendly Web
brad_frost
180
9.9k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
2.6k
Transcript
Working with Workspace Oliver Davies, Inviqa
What is Workspace? • A tool that we use and
maintain at Inviqa • Primarily for building and managing Docker Compose environments • Built on Symfony • Create custom commands for your project environments • Alternative to a bash script or a Makefile • And more... @opdavies
Features • Commands • Functions • Attributes • Encrypting/decrypting secrets
• Generating configuration files • Global services: logging, mail, proxy @opdavies
Installation # Download from GitHub. wget https://github.com/my127/workspace/releases/download/0.1.3/ws # Make it
executable. chmod +x ws # Make it accessible. mv ws /usr/local/bin @opdavies
@opdavies
Replacing your Makefile @opdavies
Running simple commands 1 # workspace.yml 2 3 workspace('oliverdavies-uk'): 4
description: My personal website codebase. 5 6 command('say-hello'): 7 #!bash 8 echo 'Hello world' 9 10 command('say-hello'): 11 #!php 12 echo 'Hello World'; @opdavies
@opdavies
'run' vs. 'passthru' command('say-hello'): #!bash run echo 'Hello World' passthru
echo 'Hello World' @opdavies
Attributes 1 attribute('message'): Hello World! 2 3 command('say-hello'): | 4
#!bash|@ 5 echo @('message') @opdavies
Arguments 1 command('say-hello <name>'): | 2 #!bash|= 3 echo ={
@('message') } from ={ input.argument('name') } @opdavies
Environment variables 1 command('say-hello <name>'): 2 env: 3 MESSAGE: =
@('message') 4 NAME: = input.argument('name') 5 exec: | 6 #!bash|= 7 echo "$MESSAGE from $NAME" @opdavies
Managing secrets # ws secret generate-random-key key('default'): 'd38be3b7aa42fdbfb14c0d25f07bc1875edd5f13f640cd76' # ws
secret encrypt 'Hello World!' attribute('message'): = decrypt('YTozOntpOjA7czo3OiJkZWZhdWx0Ijt') command('say-hello'): | #!bash|@ echo @('message') @opdavies
Example: building slides from rst2pdf @opdavies
Attributes attributes: rst2pdf: command: | = 'rst2pdf ' ~ @('rst2pdf.filename.rst')
~ ' --break-level 1 --stylesheets main --fit-background-mode scale --extension-module preprocess --output ' ~ @('rst2pdf.filename.pdf') filename: pdf: slides.pdf rst: slides.rst thumbnail: filename: thumbnail.png @opdavies
Generating PDFs command('pdf generate <talk>'): | #!bash|= cd ={ input.argument('talk')
} passthru ={ @('rst2pdf.command') } command('pdf watch <talk>'): | #!bash|= cd ={ input.argument('talk') } passthru nodemon -e rst,style,txt -x "={ @('rst2pdf.command') }" @opdavies
Generating thumbnails command('thumbnail <talk>'): env: PDF_FILENAME: = @('rst2pdf.filename.pdf') THUMBNAIL_FILENAME: =
@('thumbnail.filename') exec: | #!bash|= cd ={ input.argument('talk') } passthru gs -sDEVICE=png16m -r300 -dDownScaleFactor=4 -sOutputFile=$THUMBNAIL_FILENAME -dLastPage=1 $PDF_FILENAME @opdavies
Configuration files @opdavies
Using confd 1 attributes: 2 drupal: 3 docroot: web 4
5 command('apply config'): | 6 #!php 7 $ws->confd('workspace:/confd')->apply(); 8 9 confd('workspace:/confd'): 10 - src: 'vhost.conf' 11 dst: 'workspace:/.my127ws/docker/nginx/default.conf' @opdavies
vhost.conf.twig The source file. 1 server { 2 server_name _;
3 root /app/{{ @('drupal.docroot' )}}; 4 @opdavies
default.conf The generated file. 1 server { 2 server_name _;
3 root /app/web; 4 @opdavies
Demo: "Workspacing" my site @opdavies
Thanks! References: • https://github.com/my127/workspace • https://oliverdavies.link/workspace-demo • https://oliverdavies.link/workspacing-site Me: •
https://www.oliverdavies.uk @opdavies