Closed mpolomdeepsense closed 1 year ago
I think it would be really nice to have even a short, soundless GIF on the Racetrack's home page. Such a short demo could present typical use case: job deployment, dashboard and swaggerUI.
I wouldn't make more than one video. As for documentation, I strongly prefer written form. If something's missing, we should fill out the Markdown docs first.
Agree with @iszulcdeepsense one of the videos should be fairly brief, probably oundless, and show the primary use case of RT: I write a simple python snippet, then with 15 seconds on the CLI it's deployed to a k8s cluster and I can curl it and see its swagger and so on. Said python should be as few lines as possible.
As for:
How to set up Racetrack. Everything about jobs (create, upload, update manifest, etc.) Administrating/Managing Racetrack.
Those are good ideas, but they're pretty comprehensive. I was imagining something more bite sized, but it's possible your idea is better. Not sure.
I propose to make a silent video with subtitles for a home page, according to the following playbook:
job.yaml
as concise as possible.racetrack deploy
So, after few hours of work I managed to come up with something like this, 40s video. Probably few things could be done better like curl response is in the same line as a new line, it's not well readable at first. Also, I'm not a master at exporting such videos so the best I have right now is 2,7 MB mp4. The gifs I tried to export had a really bad quality, this one is not that big and has a good enough quality.
This one will probably be replaced with a dashboard showcase but for now, i did something like this just to show what I think it could look like
https://github.com/TheRacetrack/racetrack/assets/124889668/b2ffda1c-9e45-4c6a-8f36-6f3920826e75
I disagree about making it something less trivial than adding two integers.
The first 17 seconds of a 40 second (43% of the entire demo reel) demo reel have nothing to do with RT, it's about making a directory and opening an editor and writing python code in a file.
I think:
Just my personal opinion, but that's a lot more to the point. @iszulcdeepsense what do you think?
Also, I have a vague feeling a lot of people use asciinema, would that make your life easier in any capacity?
I was using Peek, it's for recording any part of the screen. asciinema might be better for this recording but if we also want to showcase a dashboard i don't think it will be better for the other ones.
Also, what would you prefer the video to look like? I mean the style of a recording. Full screen recording with little cuts and edits or something more like the first video I made, with more transitions, only the window (the one we work in) is visible at one time?
I think the first is simpler therefore better. Also simpler is easier to replace later since we didn't invest ten months in producing it. :)
@iszulcdeepsense @JosefAssadERST
Is something like this enough to present the basics of the dashboard? Obviously, there needs to be subtitles added but I'm just talking about the overall functionalities shown in the video.
https://github.com/TheRacetrack/racetrack/assets/124889668/52dc65e2-eb92-4c41-838b-66e6e3716536
I think that's good. Two proposed changes:
Beyond that I think it's perfect. Really shows the full basic cycle. Dashboard can do a lot more but that's not our purpose here.
Couple of remarks from me:
cat
in terminal looks odd - it's barely readable. It would be more intelligible to open vim with syntax highlighting and type in the content (auto-fill it expeditiously, not spending much time on it).Generally speaking, it looks very nice. Good job, @mpolomdeepsense , you grasped the Racetrack's spirit :smile: .
@iszulcdeepsense
What tool did you use to simulate the typing?
https://marketplace.visualstudio.com/items?itemName=dansilver.typewriter As for the terminal, I had to type it myself.
It felt pleasant to watch it at increased speed (at the first video)
Yeah, there is actually a cut between the steps, that's why it feels so fast. And on top of that video was sped up to something like x2.5 - 3.
I hope we can make the video reproducible and semi-automated by at least writing down the screenplay steps in a file and to simulate the keyboard input, while recording.
Yeah, that's doable. For sure there will be a list of steps, captions, used tools, files etc. I could also record my keyboard while recording. Do you know some nice tools for it?
I could also record my keyboard while recording. Do you know some nice tools for it?
@mpolomdeepsense It can be done fairly simple with Python. I used something like this once:
import random
import subprocess
import time
def type_line(line: str):
for character in line:
character = character.replace('"', '\\"')
shell(f'xdotool key type "{character}"')
time.sleep(0.1 * random.uniform(0.5, 1))
time.sleep(0.3)
shell('xdotool key Return')
def shell(cmd: str):
subprocess.Popen(cmd, shell=True).wait()
type_line('print("Hello")')
Good job, @mpolomdeepsense , you grasped the Racetrack's spirit
Yep, bang on. Go for it.
Script for first video (short one). Will look basically the same as the current one, with some minor changes.
Title screen caption: Racetrack - Python job and CLI showcase
is_prime.py
files and job.yaml
configuration)curl -X POST "http://localhost:7105/pub/job/prime_checker/latest/api/v1/perform" -H "Content-Type: application/json" -H "X-Racetrack-Auth: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZWVkIjoiY2UwODFiMDUtYTRhMC00MTRhLThmNmEtODRjMDIzMTkxNmE2Iiwic3ViamVjdCI6ImFkbWluIiwic3ViamVjdF90eXBlIjoidXNlciIsInNjb3BlcyI6bnVsbH0.xDUcEmR7USck5RId0nwDo_xtZZBD6pUvB2vL6i39DQI"
, then insert -d '{"n": 7}'
at the end. Execute it.-d '{"n": 10}'
instead.Record using asciinema
Video edited with 0.5s fade-in and fade-out animations. All sped up 2-3 times.
Script for second video (dashboard showcase). Still needs keyboard input recording, editing instructions, used tools etc., only overview with captions between scenes finished.
Title screen caption: Racetrack - Python job and dashboard showcase
Caption 1: After setting up the Racetrack we can begin creating our first Python job. It should consist of job.yaml
configuration file and desired .py
files.
Scene 1: Turn on the VSC (or some other IDE) and show the contents of job files.
Caption 2: Now, when we have our first job ready, we can deploy it with this command: racetrack deploy JOB_PATH --remote RACETRACK_URL
.
Scene 2: Open the terminal and input the deploy command on the previously created job. Wait for it to finish deploying.
Caption 3: By using the Racetrack dashboard we can e.g.: browse, modify, rebuild and redeploy, delete jobs. We can access it through the browser. From the dashboard, we can also access the job's SwaggerUI where it's possible to make requests to the job.
Scene 3: Open the browser and go to the Racetrack dashboard page. Log in as admin (login: admin, password: admin). It should redirect you to the list of running jobs. Select the one that was just added and click on a blue OPEN
button. It will redirect you to the job's SwagerUI. There go to /perform
endpoint and test the job by entering the request's body. After that go back to the dashboard and delete the job.
So the second video will probably be recorded using OBS. Same fade-in/out animations as in the first video. Captions will be shown in between cuts on the blurred background of the next scene. Also, some fading animations when captions appear/disappear.
What do you think about that?
To sum up:
mkdir primer
, cd primer
vim entrypoint.py
import math
class JobEntrypoint:
def perform(self, number: int) -> bool:
"""Check if a number is prime"""
if number < 2:
return False
for i in range(2, int(math.sqrt(number)) + 1):
if number % i == 0:
return False
return True
def docs_input_example(self) -> dict:
"""Return example input values for this model"""
return {'number': 7907}
2. `vim job.yaml`
```yaml
name: primer
owner_email: sample@example.com
jobtype: python3:latest
git:
remote: https://github.com/TheRacetrack/racetrack
jobtype_extra:
entrypoint_path: 'entrypoint.py'
entrypoint_class: 'JobEntrypoint'
racetrack deploy --remote http://localhost:7102
curl -X POST "http://localhost:7105/pub/job/primer/latest/api/v1/perform" \
-H "Content-Type: application/json" \
-H "X-Racetrack-Auth: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZWVkIjoiY2UwODFiMDUtYTRhMC00MTRhLThmNmEtODRjMDIzMTkxNmE2Iiwic3ViamVjdCI6ImFkbWluIiwic3ViamVjdF90eXBlIjoidXNlciIsInNjb3BlcyI6bnVsbH0.xDUcEmR7USck5RId0nwDo_xtZZBD6pUvB2vL6i39DQI"` \
-d '{"n": 7907}'
What's the reason to make 2 videos?
Oh, I thought we wanted to do that from the start. One would go as a looped gif into readme/docs first page (max 30s, like the one here) and the second one in a proper video format, with more information, subtitles etc.
But if you want to combine these videos we can do that, why not. Making two videos seemed kinda weird to me since they were similar. I deducted from the previous discussion that you wanted two separate videos, that's why two scripts.
Alright, I thought about GIF initially, but gifs tend to be infuriating cause you can't pause them and take a closer look. That's why I'm pushing for MP4 now.
Now, I'm not so sure if subtitles are necessary. It's up to you
Here is a version without any captions.
https://github.com/TheRacetrack/racetrack/assets/124889668/d7b99acf-fcef-48f3-ac95-d4356c3acb0f
This looks really cool.
A browser's view could be zoomed in, but I'm just nitpicking - it's a note for the next recording. This is already great.
Here is a version with captions
https://github.com/TheRacetrack/racetrack/assets/124889668/43648168-897c-435f-b2e1-e4f8e0313d7a
Well, I was hoping to use this feature - add subtitles to HTML video player in a <video>
player embedded in Markdown. While it works on mkdocs static pages, it doesn't seem to show up on Github. I'll check what the limitations are.
I can confirm that textual captions in a video player don't work on Github: https://github.com/TheRacetrack/racetrack/blob/286-video-tutorials-on-how-to-setup-use-add-jobs-etc/README.md while it works with our MkDocs documentation:
https://github.com/TheRacetrack/racetrack/assets/45496492/1fa3f9f6-90fb-4d9a-99f2-e7a0313eb6a7
Nevermind, let's stick to your plan - having captions hardcoded in a video.
Oh, didn't know drinking liquid nitrogen could kill me. Thanks for the warning. You truly are a life saver!
Think about the most crucial elements of setting up and using the Racetrack.
Ideas: