#tools-and-devops

1 messages Β· Page 9 of 1

heavy knot
#

ye ma english is bad but i will try

rapid sparrow
heavy knot
#

next time to be more spesific

#

tnx for that documants

lilac sail
#

Is anyone here good with image processing and selenium?

mystic void
lilac sail
#

Sorry, the problem’s already fixed
But I’ll keep you in mind for the next inevitable bug in my code πŸ˜­πŸ‘

lofty coral
#

I've spent the last couple weeks on a side project to help devs navigate and understand complicated codebases. You can check it out at https://mabbu.app/. Any feedback would be dope πŸ™!

rapid sparrow
#

Probably very useful as resume project, but practically useless

tepid light
#

A bit worrying is that your twitter account seems to have been shut down due to violations, what happened? πŸ€”

leaden agate
#

I'm currently developing an API on my local computer and I'm looking for a guide on how to containerize it using Docker and run it on my VPS. Could you provide some guidance or point me to a relevant tutorial?

#

if you have any further ideas please share with me

thin jasper
#

Which package are you using to build it?

#

and what stops you?

#

here's a description for FastAPI

#

Should be helpful for other packages as well

versed basin
#

@surreal ridge

#

If it's not too much of a bother, could you walk me though this?

surreal ridge
#

Yoyo, if I can for sure, what's the matter?

versed basin
#

Not sure how to proceed with this; I have an application that uses both Node.js and Python
I wanted to place them both inside a container, but I'm not entirely sure how to go about it; am I supposed to contain them separately or just squeeze them inside a single container? How would the communication between them work?

#

I've been entertaining just placing them under separate containers, but I have zero idea how that would work

#

I've googled it and it says that I should do that, but I wanted a second opinion

surreal ridge
#

It heavily depends on the architecture of the app and how the modules can communicate

versed basin
#

As of now, my Node consists of the D3 data viz lib, as I'm doing some stuff with graphics and so on

#

Python is Django to deal with API and general backend

#

Python feeds data to Node, Node returns graphics, Python delivers to Frontend

#

Do you need more context?

surreal ridge
#

It seems each module can be independent so yeah it might be possible. You'd need to make your application modular so that API calls can be made between the containers.

versed basin
#

Ic, I'll research a bit more about how I can make this happen

exotic crown
zinc marlin
#

Anybody experienced with initializing embedded python environments in c++?

#

Not sure if there's a better channel that fits this use case. Let me know

lethal mantle
#

it's normalish. yes, you can change it.

indigo zenith
rugged schooner
#

Hi everyone! I hope this is the right channel to post this. pithink

I'm looking for feedback for a tool we have just published. The tool is an AI-powered vscode extension, only available to analyze Python code. How it works is that it analyzes code using a graph-attention-mechanism which also stores contextual information of the code in the NN.

We then pass those detected problems along with their contextual info to an LLM, in hopes to generate context-sensitive descriptions for the problems, and code recommendations to help instantly solve them.

The tool was just released and I'm looking to learn as much as possible about its use cases and value through providing it to python users. It is of course free. The link to the tool is here: https://marketplace.visualstudio.com/items?itemName=Metabob.metabob

Any feedback would be appreciated and very helpful!

flat cape
#

Hi, I need a help with linux server related stuff.

Basically, i deployed a discord bot on aws EC2, with tmux to keep it running in the background after exiting the session. But i made a mistake. I thought that killing the tmux session would kill the whole processes inside it, but it didn't. So now I have 4 processes running the same application/program. How do i fix this? I want to delete all the unnecessary background processes that i was supposed to delete. OR, i would like to just remove all the application processes without ruining the server. Please help, thank you!

#

This might not be the right channel, but i was contemplating between asking it here or in networking.

#

i figured i can just kill a certain processes, but there is more than one for each running application. and i don't exactly know which processes to kill even if i do it manually.

rapid sparrow
flat cape
#

oooo

#

oh, thank you @rapid sparrow πŸ™ . I'll see what I can do with it.

rapid sparrow
#

First or second column of ps aux column is process Id i think, which is needed to kill

flat cape
#

oh okay

#

i'll try it

edgy relic
flat cape
#

thanks btw!

#

hmm somehow, sending kill SIGINT signal to one main process that i was running ended up deleting the rest. i don't know how. but i guess my problem is fixed now

#

thank you guys! @rapid sparrow @edgy relic

#

nvm it seems like the background processes comes back after i run it again, well, i'll figure it out, i think i'll just try deleting it one by one with htop while they are running

#

thanks a bunch!

hollow wagon
#

Does anyone use Python CLI tools which are annoyingly slow? E.g. I find the AWS CLI annoying, it never responds in less than about half a second.

heavy knot
#

Is there any way to bypass cloudflare protection vnm_ZHeaozs100emoj

#

Without using selenium, pyautogui

brazen forge
#

nope

#

also

#

!rule 5

rancid schoonerBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

heavy knot
surreal ridge
hollow wagon
#

Indeed, gcloud is quite slow to start, over half a second!

flat cape
#

@rapid sparrow @edgy relic killing processes didn't work. what works tho, is reinstalling tmux, and now it works fine. you guys don't need it but i just think it's nice to let you guys know hehe. again, thanks for the help.

autumn axle
#

a vscode theme i am working on

#

i am still working on it, probably gonna interchange the variable color with string

alpine onyx
rapid sparrow
alpine onyx
rapid sparrow
# alpine onyx I want to. But I don't know how πŸ™‚ The guides are too "complicated" for me

easy shortest guide for most simple setup

  • install git bash, which comes with this https://git-scm.com/downloads
  • open git bash terminal
  • write ssh-keygen, enter, agree to all defaults(enter/enter, whatever amount of enter key presses). (key should be created at ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub paths)
  • open ~/.ssh/id_rsa.pub with notepad, copy from it content.
  • open github account, your profile settings -> SSh keys and GPG -> add SSH -> paste the content of ~/.ssh/id_rsa.pub into it

proceed to use
git clone with SSH path provided by github. git clone <ssh path of repo>
and for repositories which were already cloned, you can overwrite/fix them with git remote set-url origin <SSH path as in screenshot for repository>

rapid sparrow
#

git bash is for windows only

#

P.S. ensure to do instruction from the user which intends to use it, and not creating folders on your own. otherwise you can screw up file/folder permissions. and without admin rights.

alpine onyx
#

All went smoothly, but still can't do a "git push origin master" 😦
I'll have to try and find someone next to me or do a screen sharing or something

rapid sparrow
alpine onyx
rapid sparrow
#

have you tried reading the error? Type of problem

alpine onyx
alpine onyx
vague silo
#

that may work here but don't adopt that as a general thing to do when you get that error

rancid schoonerBOT
#

:incoming_envelope: :ok_hand: applied timeout to @heavy knot until <t:1684510794:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

spring crypt
#

Hi, does anyone know which virtual machine I can use to run MacOS in Windows?

surreal ridge
spring crypt
#

Yeah, that's what I meant

indigo zenith
low elk
#

@nova pawn Heya sorry, but we don't allow these sorts of unapproved advertisements in our server

nova pawn
#

It is not ad, I post in help section, then someone ask me to post it here

#

I'm just ask for contributors in this project

low elk
#

I'm not sure why they'd point you here, and being a place for asking for contributors just isn't really something this server is a place for

nova pawn
#

I don't know, in the end this project can be a "tools"

#

As title

low elk
#

Its still advertisement of your project though, so I'm still gonna ask that you delete it

nova pawn
#

How it is an ad if I sell nothing!, also the project not owned be me

I delete it any way

surreal ridge
exotic crown
# nova pawn How it is an ad if I sell nothing!, also the project not owned be me I delete ...

adΒ·verΒ·tise
verb
verb: advertise; 3rd person present: advertises; past tense: advertised; past participle: advertised; gerund or present participle: advertising

describe or draw attention to (a product, service, or event) in a public medium in order to promote sales **or attendance**.
"a billboard advertising beer"
    **seek to fill (a vacancy) by putting a notice in a newspaper or other medium.**
    "**for every job we advertise we get a hundred applicants**"
    h
    Similar:
    publicize

make public
make known
give publicity to
bill
post
announce
broadcast
"Meryl coughed briefly to advertise her presence"

You don't have to be selling something to "advertise" such as the job example. "For every job we advertise" They aren't selling something, they are actually buying / spending money in this case (an employee's time)

agile stag
#

@rapid sparrow is there a command prompt version of Docker that carries less space than the GUI docker?

rapid sparrow
#

will be available to get started as docker version docker run and etc commands.

rapid sparrow
agile stag
rapid sparrow
#

technically Ubuntu will be available for you with WSL2 (if you are on some kind of win10+)

rapid sparrow
#

Docker at the moment OS architecture depended. All images/open source solutions used under the hood use linux for it

agile stag
rapid sparrow
#

not for software development, but for web development it is certainly prefered (if you plan doing backend or devops at least)

#

some people prefer linux for all software development though (me included ^_^)

agile stag
rapid sparrow
rapid sparrow
agile stag
agile stag
#

My Laptop's hard drive VS my external hard drive

indigo zenith
agile stag
#

And I can't even run Docker from my external drive

indigo zenith
indigo zenith
agile stag
#

I am trying to build my first docker image or whatever you call it and this is what popped up on my terminal.

=> [internal] load build definition from Dockerfile                                                                   2.1s 
 => => transferring dockerfile: 101B                                                                                   0.3s 
 => ERROR [internal] load metadata for docker.io/library/node:apline                                                  13.9s 
------
 > [internal] load metadata for docker.io/library/node:apline:
------
Dockerfile:1
--------------------
   1 | >>> FROM node:apline
   2 |     COPY . /app
   3 |     WORKDIR /app
--------------------
ERROR: failed to solve: node:apline: docker.io/library/node:apline: not found
#

my Dockerfile code

FROM node:apline
COPY . /app
WORKDIR /app
CMD node app/app.js
brazen forge
#

typo: should be node:alpine

agile stag
#
docker image ls
REPOSITORY     TAG       IMAGE ID       CREATED              SIZE
hello-docker   latest    e2dd4b9ab339   About a minute ago   180MB

This is really cool. I feel like a DevOps Engineer.

rapid sparrow
#

it consumes additional memory on each open source docker image load

#

it consumes additional memory on each docker image build

#

it is possible of course to wipe all the time with --rm, down --volumes, docker system prune --volumes and etc

#

but it is not going to help a lot

#

Linux is kind of more space efficient system, with ncdu installed and sometimes used to clean system, you could survive for more time

#

i still used 250 gb even on linux though

#

60 gb is not going to last long

#

pypi packages alone will consume all this space quickly if not erased

earnest forum
#

Hi guys. I have an issue with working with docker. currently following a tutorial. I have an image built but getting a: docker: Error response from daemon: unable to find user nonroot: no matching entries in passwd file. Whenever i try to start the image in a container. I'm thinking of clearing the build cache and building the image from scratch. But doesn't still seem to address the issue of the "user" not being found. What is the best approach to solve this?

rapid sparrow
earnest forum
rapid sparrow
#

wipe and reinstall again, official instruction contains instructions for that

earnest forum
#
FROM golang:1.19-buster as build

WORKDIR /app

COPY go.mod go.sum ./

RUN --mount=type=cache,target=/go/pkg/mod \
    --mount=type=cache,target=/root/.cache/go-build \
    go mod download

COPY . .

RUN go build \
    -ldflags="-linkmode external -extldflags -static" \
    -tags netgo \
    -o api-golang

###
FROM scratch

ENV GIN_MODE release

COPY --from=build /etc/passwd /etc/passwd

COPY --from=build /app/api-golang api-golang

USER nonroot

EXPOSE 8080

CMD ["/api-golang"]
earnest forum
rapid sparrow
#

when it reaches USER nonroot

#

or when u launch docker image build πŸ€”

earnest forum
rapid sparrow
#

try creating user with manual command and then activating USER

#

you know adduser command

earnest forum
earnest forum
rapid sparrow
#

do you have rootless docker?

earnest forum
# rapid sparrow do you have rootless docker?

kind of new to docker so i don't get what you mean. But since i'm creating the containers and the builds i should have root docker as well i'm guessing. Or am i missing the context of what you mean?

rapid sparrow
#

did you install default docker version?

#

or rootless docker modification

rapid sparrow
earnest forum
earnest forum
earnest forum
#
FROM node:19.6-alpine

WORKDIR /usr/src/app

ENV NODE_ENV production

COPY package*.json ./

RUN --mount=type=cache,target=/usr/src/app/.npm\
 npm set cache /usr/src/app/.npm && \
 npm ci --only=production

USER node

COPY --chown=node:node ./src .

EXPOSE 3000

CMD ["node", "index.js"]
earnest forum
rapid sparrow
# earnest forum but i'm still kind of confused why this file worked even though there's no addus...
  1. you could have launched docker run -u root ... with user override
  2. you could have launched old version of container before you added user (that will happen if u launched container with specific name --name=smth)
    (compose automatically assigned container name, docker compose down --volumes --remove-orphans to stop and kill compose containers)

in order to make sure you aren't using old verions
you need to stop and kill previous existing containers

docker stop container_name
docker kill container name
(there is version that kills all)

and then rebuild docker image
and only then run

earnest forum
# rapid sparrow 1) you could have launched `docker run -u root ...` with user override 2) you co...

i added the useradd command and rebuilt from the cached build i had previously. Firstly, it didn't invalidate the cache which i thought it would since i changed the dockerfile from the top so it looks something like this:

FROM golang:1.19-buster as build

WORKDIR /app

RUN useradd -u 1001 nonroot

COPY go.mod go.sum ./

RUN --mount=type=cache,target=/go/pkg/mod \
    --mount=type=cache,target=/root/.cache/go-build \
    go mod download

COPY . .

RUN go build \
    -ldflags="-linkmode external -extldflags -static" \
    -tags netgo \
    -o api-golang

###
FROM scratch

ENV GIN_MODE release

COPY --from=build /etc/passwd /etc/passwd

COPY --from=build /app/api-golang api-golang

USER nonroot

EXPOSE 8080

CMD ["/api-golang"]

However i do have previous built images but i didn't specify a user whilst creating them. But it might have something to do with what you said

earnest forum
#

When i try to do a RUN ls after the --from=build i get a ERROR: failed to solve: process "/bin/sh -c ls" did not complete successfully: exit code: 1. Please can anyone point out what is wrong with the file

rapid sparrow
#

docker run -it --rm image_name bash write to enter debug and check what u see

earnest forum
earnest forum
rapid sparrow
#

u need to use some other image or to install shell/bash, or don't use shell after FROM scratch

earnest forum
rapid sparrow
#

CMD ["/api-golang"] is absolute path

#

you copied to relative path

#

CMD ["./api-golang"] is correct one

earnest forum
# rapid sparrow it unclear at which path you are located. <:pithink:652247559909277706> WORKDIR...

I updated the file and it looks like this:

# Pin specific version for stability
# Use separate stage for building image
# Use debian for easier build utilities
FROM golang:1.19-bullseye AS build

# Add non root user
RUN useradd -u 1001 nonroot

WORKDIR /app 

# Copy only files required to install dependencies (better layer caching)
COPY go.mod go.sum ./

# Use cache mount to speed up install of existing dependencies
RUN --mount=type=cache,target=/go/pkg/mod \
  --mount=type=cache,target=/root/.cache/go-build \
  go mod download

COPY . .

# Compile application during build rather than at runtime
# Add flags to statically link binary
RUN go build \
  -ldflags="-linkmode external -extldflags -static" \
  -tags netgo \
  -o api-golang

# Use separate stage for deployable image
FROM scratch

# Set gin mode
ENV GIN_MODE=release

WORKDIR /

# Copy the passwd file
COPY --from=build /etc/passwd /etc/passwd

# Copy the binary from the build stage
COPY --from=build /app/api-golang api-golang

# Use nonroot user
USER nonroot

# Indicate expected port
EXPOSE 8080

CMD ["/api-golang"]

But still the same issue

rapid sparrow
# earnest forum I updated the file and it looks like this: ```dockerfile # Pin specific version ...

https://github.com/GoogleContainerTools/distroless

# Start by building the application.
FROM golang:1.18 as build

WORKDIR /go/src/app
COPY . .

RUN go mod download
RUN CGO_ENABLED=0 go build -o /go/bin/app

# Now copy it into our base image.
FROM gcr.io/distroless/static-debian11
COPY --from=build /go/bin/app /
CMD ["/app"]

use distroless for minimum sized image golang runners, less headache will be

#

debian distroless matches debian build image. zero issues will be

earnest forum
rapid sparrow
# earnest forum let me try this. But i'm actually following a tutorial. Don't know if this would...

Scratch is a special zero weight image, as the most foundation image. part of docker special syntax pretty much
i don't know details how to utilize it tbh. it is used to build other stuff. for this reason it should be most challenging to use.
I used as smallest Alpine images (which will conflict with Golang build in debian if u don't disable CGO at least)
and distroless debians (as more easiest choice)

rapid sparrow
earnest forum
rapid sparrow
rapid sparrow
#

in the meantime at my work we use 1 gb sized images xD (python libs are heavy)

earnest forum
#

don't know if i can change:
RUN go build \ -ldflags="-linkmode external -extldflags -static" \ -tags netgo \ -o api-golang
To then include RUN CGO_ENABLED=0 go build -o /go/bin/app as thisRUN CGO_ENABLED=0 go build \ -ldflags="-linkmode external -extldflags -static" \ -tags netgo \ -o api-golang

rapid sparrow
earnest forum
rapid sparrow
earnest forum
rapid sparrow
#

python is not very friendly to optimize in terms of docker image size in the first place (very hardly compilable)

earnest forum
rapid sparrow
earnest forum
earnest forum
rapid sparrow
#

not really important in comparison to other more pending issues

earnest forum
#

This is how my dockerfile looks now:

# Pin specific version for stability
# Use separate stage for building image
# Use debian for easier build utilities
FROM golang:1.19-bullseye AS build

# Add non root user
RUN useradd -u 1001 nonroot

WORKDIR /app 

# Copy only files required to install dependencies (better layer caching)
COPY go.mod go.sum ./

# Use cache mount to speed up install of existing dependencies
RUN --mount=type=cache,target=/go/pkg/mod \
  --mount=type=cache,target=/root/.cache/go-build \
  go mod download

COPY . .

# Compile application during build rather than at runtime
# Add flags to statically link binary
ARG CGO_ENABLED=0

RUN go build \
  -ldflags="-linkmode external -extldflags -static" \
  -tags netgo \
  -o api-golang

# Use separate stage for deployable image
FROM gcr.io/distroless/static-debian11

# Set gin mode
# ENV GIN_MODE=release

WORKDIR /

# Copy the passwd file
COPY --from=build /etc/passwd /etc/passwd

# Copy the binary from the build stage
COPY --from=build /app/api-golang api-golang

# Use nonroot user
USER nonroot

# Indicate expected port
EXPOSE 8080

CMD ["/api-golang"]

#

and i get a ERROR: failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount1107096260/Dockerfile: no such file or directory

rapid sparrow
#

plus u create user in image Debian building, while changing user in Distroless

#

user does not even exist, because it is created in previous image

#

they aren't transfered to changed multilayered next image

rapid sparrow
#

perhaps it is still important

earnest forum
#

or you mean i shouldn't copy /etc/passwd

earnest forum
earnest forum
earnest forum
#

but i'm not getting ano such file or directory error any longer

rapid sparrow
earnest forum
rapid sparrow
earnest forum
rapid sparrow
#

What shows docker logs cf1

#

Have u tested your application works without docker image?
Added logging records?

earnest forum
# rapid sparrow How do u launch/run it ^_^

i did docker run -it --rm api-golang-main i also did docker run --rm api-golang-main. When i do a docker container ls i can find the image but no longs. And then i ran it finally doing :

docker run -d            --name api-golang-main              --network my-network            -e DATABASE_URL=${DATABASE_URL}             -p 8080:8080                --restart unless-stopped            api-golang-main
cf14ec5e95bd51d5354cf603ddf835d8007dd0ec73af1c4e7f5b4a248248d59f
earnest forum
#

The 502 is from the golang

thorn portal
#

cf14ec5e95bd api-golang-main "/api-golang" 4 minutes ago Restarting (133) 22 seconds ago
seems to indicate a reboot loop?
do you know what's exit code 133?

are there absolutely nothing when you do docker logs cf14ec5e95bd?

earnest forum
thorn portal
thorn portal
earnest forum
#

no i don't let me check. Sorry for the delay in response

thorn portal
#

i would try not using gcr.io/distroless/static-debian11 as base image first, just to rule out that's the issue, go for a regular debian image instead for now

#

@earnest forum ultimately i can't replicate the issue nor can i immediately spot anything interesting, i think the only path forward for now is to understand what exactly does the exit code 133 mean, and fix the underlying issue.

earnest forum
earnest forum
thorn portal
earnest forum
#

Plus i'm using the github files made by the person who made the tutorial. The api works whilst he was making the tutorial so its either there's an issue with the file or with something i'm doing

west lagoon
#

What everyone's favorite continuous integration tool.. and what's the main reason why you favor that particular tool over others?

fringe falcon
#

I KNEW I would still need help with code lol. Working on something with ChatGPT, and I can't seem to resolve an issue with the terminal window I added not echoing what would go in the terminal. I'm on Linux. well the coding machine is Linux lol It suggested changes to the code to make it run on seperate threads, but it still appears to not work as intended. https://paste.pythondiscord.com/donenameli

thorn portal
thorn portal
earnest forum
earnest forum
earnest forum
earnest forum
#

which is mainly why switching between scratch and distroless had no effect

#

can you please explain what this line is doing:

RUN go build \
  -ldflags="-linkmode external -extldflags -static" \
  -tags netgo \
  -o api-golang
thorn portal
#

not really a go guru, but it's probably compiling relative to current dir and build a binary called api-golang

#

the ldflags and tags are unknowns to me

earnest forum
#

the reason i asked that is if its building it then the api-golang dir should exist after that line is ran through in the build process. But it doesn't exist

thorn portal
#

right, api-golang imo should be a executable binary instead of a dir

thorn portal
earnest forum
thorn portal
#

indeed, you should be able to see it.

#

could you post your current dockerfile?

earnest forum
#

sure

earnest forum
# thorn portal could you post your current dockerfile?
# Pin specific version for stability
# Use separate stage for building image
# Use debian for easier build utilities
FROM golang:1.19-bullseye AS build

# Add non root user
RUN useradd -u 1001 nonroot

WORKDIR /app 

# Copy only files required to install dependencies (better layer caching)
COPY go.mod go.sum ./

# Use cache mount to speed up install of existing dependencies
RUN --mount=type=cache,target=/go/pkg/mod \
  --mount=type=cache,target=/root/.cache/go-build \
  go mod download

COPY . .

# Compile application during build rather than at runtime
# Add flags to statically link binary
RUN go build \
  -ldflags="-linkmode external -extldflags -static" \
  -tags netgo \
  -o api-golang

RUN ls -la 

# Use separate stage for deployable image
FROM scratch

# Set gin mode
ENV GIN_MODE=release

WORKDIR /

# Copy the passwd file
COPY --from=build /etc/passwd /etc/passwd

# Copy the binary from the build stage
COPY --from=build /app/api-golang api-golang

# Use nonroot user
USER nonroot

# Indicate expected port
EXPOSE 8080

CMD ["/api-golang"]

I had to switch back from distroless when it didn't solve the issue

thorn portal
earnest forum
#

With distroless, i don't get any errors. Not in the logs and its just restarting

earnest forum
thorn portal
earnest forum
thorn portal
earnest forum
thorn portal
earnest forum
thorn portal
#

just in the same place wherever you run the docker build command

earnest forum
# thorn portal output of `find . | grep go` please
./go-workspace/pkg/mod/cache/download/github.com/kr/pretty/@v/v0.1.0.mod
./go-workspace/pkg/mod/cache/download/github.com/kr/pty
./go-workspace/pkg/mod/cache/download/github.com/kr/pty/@v
./go-workspace/pkg/mod/cache/download/github.com/kr/pty/@v/list
./go-workspace/pkg/mod/cache/download/github.com/kr/pty/@v/v1.1.1.mod
./go-workspace/pkg/mod/cache/download/github.com/google
./go-workspace/pkg/mod/cache/download/github.com/google/gofuzz
./go-workspace/pkg/mod/cache/download/github.com/google/gofuzz/@v
./go-workspace/pkg/mod/cache/download/github.com/google/gofuzz/@v/list
./go-workspace/pkg/mod/cache/download/github.com/google/gofuzz/@v/v1.0.0.mod
./go-workspace/pkg/mod/cache/download/github.com/google/go-cmp
./go-workspace/pkg/mod/cache/download/github.com/google/go-cmp/@v
./go-workspace/pkg/mod/cache/download/github.com/google/go-cmp/@v/list
./go-workspace/pkg/mod/cache/download/github.com/google/go-cmp/@v/v0.5.5.mod
./test/example_test.go

Its a lot of outputs but just copied a bit of it.

#

Go is being downloaded and i can confirm that. But the issue is really with the api-golang binary i think

thorn portal
#

what i did
cp -r 05-example-web-application/api-golang/ /tmp/api-golang
use your dockerfile
cd /tmp/api-golang
docker build -t api-golang:t4 .

and it builds correctly

#

add a gibberish line COPY --from=build /app/saodifjasdoifjsdaoij fawoeifjaweo
and it doesn't build as expected

#

so we can conclude
in COPY --from=build /app/api-golang api-golang
/app/api-golang definitely exists in build
the api-golang at the end is my interest now

#

since you have WORKDIR / it should be /api-golang, so CMD ["/api-golang"] should just work

#

i am proceeding to actually try to run the image now, will see what happens @earnest forum

earnest forum
#

The output is almost at the end of the video. You can check to verify as well. I think its an issue with the binary except the ls command isn't meant to output/show the binary

thorn portal
#

i am fairly sure

thorn portal
#

issue is just ls -la doesn't print output in build time

earnest forum
thorn portal
earnest forum
earnest forum
thorn portal
#

docker build --progress plain -t api-golang:t4 .
--progress plain is maybe needed to get that progress output

earnest forum
#

so the binary not being created is ruled out as the reason for the error. Then the issue is somewhere in the scratch file

thorn portal
#

indeed!

#
docker run \
  --env POSTGRES_PASSWORD=foobarbaz \
  --publish 5432:5432 \
  postgres:15.1-alpine

docker run -d --name api-golang-main --network host -e DATABASE_URL=postgres://postgres:foobarbaz@localhost:5432/postgres --restart unless-stopped api-golang:t4

had a super quick go at it, this works

#
❯ docker logs api-golang-main
2023/05/24 09:47:27 DATABASE CONNECTED πŸ₯‡
#

i have to go now, got an interview to attend, will be back in a few hours!

earnest forum
earnest forum
earnest forum
#

Finally have it working. Thanks a lot

#

and i learnt a lot as well

thorn portal
earnest forum
# thorn portal ```bash docker run \ --env POSTGRES_PASSWORD=foobarbaz \ --publish 5432:5432...

couldn't have done it without you. What i specifically found out was whilst connecting the db to the golang api, the db wasn't exported into the shell so that was either causing the issue or whilst i was running the run command. I was expecting both the --name to be the same with the name at the end of the command. But When you sent this code. I saw you added a tag at the end of the command which i then tried and that kind of worked for me and allowed me to debug other issues with it

#

and hope your interview went great

heavy knot
#

Hey there i wanted help in dual booting is this the right channel?

#

I have a Dell laptop with 128 gb ssd and 900gb hdd of which i rarely use the hdd except for storing some file. Since my pc isn't powerful enough to run VMs while maintaining the performance, i want to dual boot it with windows 11? Any idea which Linux will run better along with win 11 elementary zorin Ubuntu or pop? And also do i need to disable secure boot? Can I install without a usb?

thorn portal
# earnest forum and hope your interview went great

oh i was the interviewer and it went meh :\

the db wasn't exported into the shell
smells like network issue? i used --network host to make use of the postgres i spun up with docker easily
i think you tried something similar with --network my-network, i just assumed you did it correctly, but it's worth asking nonetheless: did you start postgres on that network as well?

another comment is i don't really know what you meant by that thing re. --name
here is a quick explaination

docker run -d --name api-golang-main --network host -e DATABASE_URL=postgres://postgres:foobarbaz@localhost:5432/postgres --restart unless-stopped api-golang:t4
                     ^--- container name       ^- use host's network, so localhost:5432 within the container is actually localhost on your PC, not just from the perspective of the container
docker run -d --name api-golang-main --network host -e DATABASE_URL=postgres://postgres:foobarbaz@localhost:5432/postgres --restart unless-stopped api-golang:t4
                                                                                                                                                   ^--- image to spin up, you want this to be the same as the image name (including the tag) you have used in docker build -- if you just say "api-golang", it's going to resolve to the latest image of "api-golang" you have built or "api-golang:latest" - N.B. This might be wrong, but that has been my experience

docker build -t api-golang:t4 .
                ^-- the image you have built, should be the same as the final arg above, "api-golang" is image name, "t4" is the tag
earnest forum
earnest forum
earnest forum
brazen forge
thorn portal
thorn portal
earnest forum
earnest forum
thorn portal
thorn portal
earnest forum
earnest forum
thorn portal
inner iris
#

Not sure if this is the best channel for my question but here goes: I have a script running and I suspect there is something wrong with it and can't close it or I'll lose the state. The problem is that I don't expose the state via logs or anything else. Is there any way to inspect an already running process and see what values the variables have?

thorn portal
#
# /tmp/testing.py
import time


x = 42;

def main():
    global x
    while True:
        x += 1
        time.sleep(5)
        print(x)


if __name__ == "__main__":
    main()

# /tmp/inject.py
print('from injected', x)

python /tmp/testing.py
pyrasite 122381 /tmp/inject.py

replace 122381 with your PID

thorn portal
# thorn portal POC

the repeated 83, 84 are generated with the same mechanism - i just didn't put the 'from injected' in print before.

#

note: you need to enable ptrace for this to work - please understand the implication before enabling it

sudden steeple
#

hello fellow python enthusiasts, i need help with my coding school project. I'm coding on visual studio code (i'm kinda new in coding) i want to make an app just like soundpad on steam, but just free version (I hate when i can just start 10sounds in free soundpad demo), i made everything but i don't know how to do that others in vc could hear my sound effects

#

import pygame
from tkinter import *
from tkinter import filedialog
from PIL import ImageTk, Image
import os

def selectFolder():
global songs
songs=[]
songPath = filedialog.askdirectory() #narsymas
fileList = os.listdir(songPath) #nuskaitymas
for song in fileList:
if ".mp3" in song:
songs.append(f'{songPath}/{song}')
print(songs)
playSong(0)

def playSong(index):
global title
pygame.mixer.music.unload()
pygame.mixer.music.load(songs[index])
pygame.mixer.music.play()
songTitle =songs[index].split("/")[-1] #nerodo title
title.config(text="songTitle")

def nextSong():
global index
index = index+1
if index>=len(songs):
index=0
playSong(index)

def previousSong():
global index
index = index-1
if index<0:
index=len(songs)-1
playSong(index)

def play():
global playing
if playing:
pygame.mixer.music.pause()
else:
pygame.mixer.music.unpause()
playing= not playing

songs =[]
index=0
playing = False
window = Tk() #informuoju, kad bus GUI
window.geometry("400x400")
pygame.init()
pygame.mixer.init()
frame = Frame (window, width=200, height=200)
frame.pack()
#paveiksliukas
image = Image.open("empty.png")
resize_image = image.resize((400,200))
img = ImageTk.PhotoImage(resize_image)
Label(frame, image=img).pack()

titleLabel = Frame(window, width=400, height=50)
titleLabel.pack()

title= Label(titleLabel, text="klangbund (ˈsoun(d)bôrd)")
title.grid(row=0, column=3)

frame2= Frame(window, width=200, height=100)
frame2.pack()

playButton = Button(frame2, text="⊴", command=previousSong)
playButton.grid(row=0, column=0)

playButton = Button(frame2, text="β–Ά", command=play)
playButton.grid(row=0, column=1)

playButton = Button(frame2, text="⊡", command=nextSong)
playButton.grid(row=0, column=2)

playButton = Button(frame2, text="...", command=selectFolder)
playButton.grid(row=0, column=3)

window.mainloop()

inner iris
inner iris
#

What if I can restart the script and modify it, is there a simpler way to just get a Python shell into it?

rapid sparrow
#

pdb google to find out commands

#

you can use print(variable)

#

list current code to see and etc

inner iris
#

Any other way? I don't want the script to stop.

rapid sparrow
#

if u use python backend django, it has python3 manage.py shell integrated shell for this purpose already

inner iris
#

How exactly would I do that?

rapid sparrow
rapid sparrow
# inner iris How exactly would I do that?

essentially pseudo algorithm of idea looks like this

from multithreading import thread

class GlobalStorage:
  def __init__():
    lock = Lock()

  def __get__item:
     with self.lock:
       get_data

storage = global_storage()

script():
  code
  storage["abc"]

run():
  thread(func=script).start()
  breakpoint()

you enter debugging shell, script starts and uses storage

inner iris
#

I mean I know how to launch a thread. And good point on safety although maybe the GIL takes care of that. I'm just not sure how exactly I'd be using this setup.

#

How do I enter a debugging shell or attach to it or whatever?

rapid sparrow
inner iris
#

Gah, this feels annoying to set up.

rapid sparrow
inner iris
#

That is very true but in my case I'm running this on a remote VM. πŸ˜„

rapid sparrow
inner iris
#

Hey I'm trying to do this simpler and easier, not the other way around. πŸ˜„ This is not some enterprise solution.

rapid sparrow
inner iris
#

It's a long-running process and I turn my laptop off and take it places. πŸ˜„

#

Basically it's just polling a website. But I suspect something is broken and I want to see what.

rapid sparrow
#

(and running unit tests xD preferably automatically in CI of github actions for example, on every commit)

inner iris
#

Running unit tests for a script like that? πŸ˜„

rapid sparrow
#

it will make easier maintance

#

less effort to upkeep

#

less effort even to develop

inner iris
#

I only intend to ever use it for a few days.

rapid sparrow
#

nothing is more permament than temporal πŸ˜‰

short peak
#

"we can always improve it later" is another popular one

inner iris
#

Logging is kinda difficult because the webpage is kinda large.

#

What I do log is whether I found what I was polling for or not. If I log everything that happens, I will no longer see this.

#

b"'PyGILState_Ensure' has unknown return type; cast the call to its declared return type\n'PyRun_SimpleString' has unknown return type; cast the call to its declared return type\nHistory has not yet reached $1.\n"

#

I guess in theory I could use plain gdb? Though I have no clue how to use it.

#

Or... with VSCode, I don't suppose I could start it remotely, then shut my laptop down and reattach to the process tomorrow?

thorn portal
inner iris
#

Yeah the VM is linux. Let me re-read what you wrote.

thorn portal
#

when it complains about ptrace is disabled, it shows you a oneliner to enable it

inner iris
#

Yeah I enabled it and then got the SimpleString error.

thorn portal
#

what is "the SimpleString error"?

inner iris
#

b"'PyGILState_Ensure' has unknown return type; cast the call to its declared return type\n'PyRun_SimpleString' has unknown return type; cast the call to its declared return type\nHistory has not yet reached $1.\n"

thorn portal
#

use pyrasite with --verbose

inner iris
#

Without --verbose it just gives me nothing. This was with verbose.

thorn portal
#

πŸ‘

#

try the fix, looks really relevant

inner iris
#

I don't suppose there is a python command that'd give me a Python shell that I could put somewhere within my code? And then some command in the shell that'd return back to execution?

thorn portal
#

there is, consult how django does it, darkwind pointed you toward the same path i believe

inner iris
#

Not sure what the fix is in that issue.

thorn portal
inner iris
#

Ok now it just hangs.

#

Gah!

thorn portal
#

double check you have gdb

inner iris
#

I do.

thorn portal
#

meh, then i am out of ideas

#

gdb (version 7.3+)?

inner iris
#

Ah great, it also took my script process with it.

thorn portal
#

😱

short peak
#

why don´t just use pdb? it's CLI but does the work 🀷

inner iris
#

The point is, that this breakpoint must be conditional - only when I want to debug it. Otherwise, just run normally.

thorn portal
#

oh, i thought you wanted to recover states in a currently running script without restarting.

inner iris
#

It's too late for that now. πŸ˜„

thorn portal
#

if you just want a conditional breakpoint, maybe something via signals

thorn portal
inner iris
#

A python shell sounds more user-friendly, if that's possible.

rapid sparrow
inner iris
#

How would I even test this? I'm not sure what's happening.

rapid sparrow
#

assert that each small part of code, works as expected according to expected logic

#

replacing third party APIs with Spy classes or Mocks for faster and predictably testing
getting better logging on your way too ^_^

thorn portal
#

why do you want a python shell within a running script?

#

there are valid reasons for it, i just want to make sure it is so in your case

inner iris
#

It felt like the easiest way to explore variables.

#

Maybe fiddle with some of them.

rapid sparrow
#

debugging logging is supposed to be outputing variables for working program

thorn portal
#

logging is better than getting a shell for read-only things.
as for write, establishing a proper interface to mutate states is often better than getting a shell and then setting variables

inner iris
#

Are you about to tell me to develop an API for my 20 line script?

thorn portal
#

not necessarily. e.g. have a config file, in the script periodically check the last modify timestamp and mutate state if sensible

#
import signal
import code

def signal_handler(signal, frame):
    print("Signal caught! Dropping into Python shell...")
    code.interact(local=dict(globals()))

signal.signal(signal.SIGHUP, signal_handler)

import time
x = 0
while True:
    x += 1
    print(x)
    time.sleep(5)

if you want to pursue the python shell way

#

it's your choice ultimately, i am just saying i wouldn't do it that way.

inner iris
#

This looks way easier. My script is a throwaway hack so it feels like this is a better choice.

#

Looks like it does exactly what I wanted, thanks guys!

#

Though say I have a long-running process I want to debug with... say pdb? Would I use a similar approach or something else? It would also be a log easier if I could use some UI like VSCode (or even better - IntelliJ).

thorn portal
#

VSCode/IntelliJ's debugger is heavy weight, there are a lot of performance concern if you use them.
personally i don't know how to interact with it so i can't comment.

you can probably consule VSCode's source to see how their debugger works, and how it attaches itself to a running process (one that's altered by the debugger i assume, otherwise i can't explain the performance degradation) - all this is too much work for something so simple though, i would just be content with sticking to pdb using similar mechanism

inner iris
#

Going through large arrays with just plain pdb sounds like a huge pita.

thorn portal
#

there is interact in pdb

#

but i have yet found a way to resume from that shell, perhaps you can enlighten me when you find out

#

bah, it's just Ctrl-D, doh.

#

i am sure i have tried that, i can't remember under what condition it didn't work now, i assume it's either i am using ipdb or something about stdin is messed up at the time

tepid light
#

Catching up with the discussion about running code here (might have missed out on some things, though), but this kind of problem is what REPL Driven Development can solve. In Python, it isn't as sophisticated as in Clojure (where you actually connect to a running app and can query and even modify the program while running) - but you can evaluate your code from the editor, and start off the app from its entry point. From there you should be able to "live inspect" the code and what's happening. Might take you a bit on the way to find problems in code.

Example:

#

(running code from the code editor, changing a submodule, re-running a function)

viral gull
#

What tool is this?

tepid light
zinc condor
#

why are mine diff than the one in the course (mine on right)... lemon_clown

#

thats not the problem, look at the terminal

#

its not the same...

#

how πŸ’€

#

wdym

#

but when i try "name.py" it doesnt work

#

the file name would still show next to it untitled

#

oh...

#

bro im so embarrassing tysm

#

ok mr/ms petey the english teacher

sweet briar
#

how can I send a mouse click to a headless application?

serene seal
#

Tools/Devops seems like the place to ask about Selenium - I'm doing a fresh setup on this dev PC, installed selenium, grabbed latest chromedriver, how do I point selenium to that path? It is in the root dir of my project

indigo zenith
indigo zenith
serene seal
#
os.path.exists('chromedriver.exe')
``` evaluates to true but when doing 

```python
with webdriver.Chrome(executable_path='chromedriver.exe') as driver:

still results in:

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
sweet briar
#

idk if it would be considered actually "headless"

#

but I basically need to directly send a mouse click into the program, without using my mouse on the screen

serene seal
#

I'm getting the feeling something else might be going on, I tried using chromedriver_autoinstaller and it is still returning the same exception, that or the autoinstaller doesn't work

serene seal
#

Got it, figured out the issue

supple phoenix
#

hey has anyone developed github actions workflow before ?
any idea how to develop them interactively ? coz to run them you need to push to your repo each time, and pushing to remote is not a good way to debug the errors in your workflow....

solemn osprey
#

I want to bind two Traefik endpoints to a single Docker container's different ports. With these labels:

    labels:
      - traefik.enable=true
      - traefik.http.routers.recommender-db-http.entrypoints=http
      - traefik.http.routers.recommender-db-http.rule=Host(`db.host`)
      - traefik.http.routers.recommender-db-http.middlewares=to-https@file
      - traefik.http.routers.recommender-db-https.service=recommender-db
      - traefik.http.routers.recommender-db-https.entrypoints=https
      - traefik.http.routers.recommender-db-https.rule=Host(`db.host`)
      - traefik.http.routers.recommender-db-https.tls.certresolver=letsencrypt
      - traefik.http.services.recommender-db.loadbalancer.server.port=7687
      
      - traefik.http.routers.recommender-db-ui-http.entrypoints=http
      - traefik.http.routers.recommender-db-ui-http.rule=Host(`ui.db.host`)
      - traefik.http.routers.recommender-db-ui-http.middlewares=to-https@file
      - traefik.http.routers.recommender-db-ui-https.service=recommender-db-ui
      - traefik.http.routers.recommender-db-ui-https.entrypoints=https
      - traefik.http.routers.recommender-db-ui-https.rule=Host(`ui.db.host`)
      - traefik.http.routers.recommender-db-ui-https.tls.certresolver=letsencrypt
      - traefik.http.services.recommender-db-ui.loadbalancer.server.port=7474
#

I have these errors:

msg="Configuration loaded from file: /traefik.yml"
msg="Could not define the service name for the router: too many services" routerName=recommender-db-http providerName=docker
msg="Could not define the service name for the router: too many services" providerName=docker routerName=recommender-db-ui-http
msg="Could not define the service name for the router: too many services" providerName=docker routerName=recommender-db-http
msg="Could not define the service name for the router: too many services" providerName=docker routerName=recommender-db-ui-http
msg="Could not define the service name for the router: too many services" providerName=docker routerName=recommender-db-http
msg="Could not define the service name for the router: too many services" providerName=docker routerName=recommender-db-ui-http

Is it even possible to do with Traefik?

surreal ridge
hot bison
solemn osprey
rapid sparrow
lean horizon
supple phoenix
#

@rapid sparrow thanks found this but couldnt get it to work lol

supple phoenix
vivid flint
#

has anyone worked with adb or uiautomator?

restive jasper
#

next question please

earnest forum
#

Hi guys having issues with a docker container following a tutorial. Every other container is working but whenever i run the api-node container, it stops and this is what the logs show:

node:internal/fs/utils:346
    throw err;
    ^

Error: ENOENT: no such file or directory, open '/db.crt'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at Object.<anonymous> (/usr/src/app/db.js:13:12)
    at Module._compile (node:internal/modules/cjs/loader:1275:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
    at Module.load (node:internal/modules/cjs/loader:1133:32)
    at Module._load (node:internal/modules/cjs/loader:972:12)
    at Module.require (node:internal/modules/cjs/loader:1157:19)
    at require (node:internal/modules/helpers:119:18)
    at Object.<anonymous> (/usr/src/app/index.js:1:25) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/db.crt'
}

Node.js v19.6.1
#

This is what the index.js file contains:

const { getDateTime } = require('./db');

const express = require('express');
const morgan = require('morgan');

const app = express();
const port = process.env.PORT || 3000;

// setup the logger
app.use(morgan('tiny'));

app.get('/', async (req, res) => {
  const dateTime = await getDateTime();
  const response = dateTime;
  response.api = 'node';
  res.send(response);
});

app.get('/ping', async (_, res) => {
  res.send('pong');
});

const server = app.listen(port, () => {
  console.log(`Example app listening on port ${port}`);
});

process.on('SIGTERM', () => {
  console.debug('SIGTERM signal received: closing HTTP server');
  server.close(() => {
    console.debug('HTTP server closed');
  });
});

#

And i'm using a docker-swarm file to run it. For every other services in the docker-swarm, its all working except for the api-node. This is what the docker-swarm file looks like:

version: '3.7'
services:
  client-react-nginx:
    image: sidpalas/devops-directive-docker-course-client-react-nginx:5
    deploy:
      mode: replicated
      replicas: 1
      update_config:
        order: start-first
    init: true
    networks:
      - frontend
    ports:
      - 80:8080
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/ping"]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 10s
  api-node:
    image: sidpalas/devops-directive-docker-course-api-node:9
    init: true
    depends_on:
      - db
    environment:
      - DATABASE_URL=postgres://postgres:foobarbaz@db:5432/postgres
    networks:
      - frontend
      - backend
    ports:
      - 3000:3000
    healthcheck:
      test: ["CMD", "node", "/usr/src/app/healthcheck.js"]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 10s
  api-golang:
    image: sidpalas/devops-directive-docker-course-api-golang:8
    init: true
    depends_on:
      - db
    environment:
      - DATABASE_URL=postgres://postgres:foobarbaz@db:5432/postgres
    networks:
      - frontend
      - backend
    ports:
      - 8080:8080
    healthcheck:
      test: ["CMD", "/healthcheck"]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 10s
  db:
    image: postgres:15.1-alpine
    volumes:
      - pgdata:/var/lib/postgresql/data
    environment:
      - PGUSER=postgres
      - POSTGRES_PASSWORD=foobarbaz
    ports:
      - 5432:5432
    healthcheck:
      test: ["CMD-SHELL", "pg_isready"]
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
      - backend
volumes:
  pgdata:
networks:
  frontend:
  backend:
surreal ridge
earnest forum
vast ivy
#

Hey, not sure if this is the right place for this, but I have a question. I have a well established project that is multi-platform that I would like to build a better installer for on windows. Currently, we have an innosetup installer, which installs python, pip installs my projects, and then uses nssm to install a service.

We also have an updater built into our web app that handles pip install -U itself and restarting the service.

This obviously is not anywhere near a standardized way to install a service (or a python application) on windows, let alone code/installer signing. Is there a way to use for example pywin32 to create the service (doing this either way), and also create a signable msi/msix without using something like pyInstaller first which would make my updater almost surely not work well? Putting my app on the windows store would be optimal, but not a requirement.

rapid sparrow
#

!rule 6 was your spam approved?

rancid schoonerBOT
#

6. Do not post unapproved advertising.

rapid sparrow
#

<@&831776746206265384> could you verify if it is approved spam? for many days multiple messages across multiple discord servers

hot snow
dreamy oyster
#

What channel is for discussion on visual studio code; I don't know why after updating, all my settings including my workspace.json file has been reset ?

worthy agate
#

Hello!
I just wrote CI/CD pipline in gitlab.
its simple Django application, and in pipline I have 3 stages, 1 - runs tests, 2 - pushes the app to docker repo, 3 deployes to digitalocean. And deployment is working fine, but docker container seems stopping after last stage of pipline is done. In digital ocean console I have installed docker, and after I run pipline, if I run 'docker ps' it does not show any running container. I generated SSH key locally, and I connect to digital ocaen ubuntu console via ssh key
Can some help me figure out, why container is not working after pipline is done, and so I cannot access the web app via ipv3 0.0.0.0:5000 obviously.

#

if I add 'docker ps' in pipline script, at the end, it normally outputting docker container info as expected in gitlab jobs logs

#

here is my deployment stage script which I wrote in gitlab pipline

    stage: deploy
    before_script:
        - chmod 400 $SSH_KEY
    script:
        - ssh -o StrictHostKeyChecking=no -i $SSH_KEY root@0.0.0.0"
            docker login -u $REGISTRY_USER -p $REGISTRY_PASS &&
            docker ps -aq | xargs docker stop | xargs docker rm &&
            docker run -d -p 5000:5000 $IMAGE_NAME:$IMAGE_TAG &&
            docker ps" ```
rapid sparrow
# worthy agate

try running at server docker logs 77cb (after it already died)
or whatever latest ID of container you had running

worthy agate
#

ok

worthy agate
short peak
rapid sparrow
#

or yes, u can assign fixed named as told above

worthy agate
#

but I am deleting running containers each time I run the pipline, will it still stay same?

#

so, the command will be docker run --name i-will-never-change-my-name -d -p 5000:5000 $IMAGE_NAME:$IMAGE_TAG && ?

rapid sparrow
#

container name u can have same one as long as you docker rm deleted previous one named in same way
then u can freely run new one as --name same_name again

worthy agate
#

oh so, when running the docker, and giving to it a name, and than using the name to log it, I see

short peak
worthy agate
#
            docker logs i-will-never-change-my-name &&
            docker ps " ```
this the script that I run
and output is showing nothing, no container is running for some reason
short peak
#

if you want to keep listening to container output, donΒ΄t use -d and you wonΒ΄t need to do docker logs

worthy agate
#

ok, removed -d and docker logs, and run the pipline

short peak
#

it will block the shell, just in case...

rapid sparrow
#

so better running it manually at server

rapid sparrow
worthy agate
#

can I run it manually in gitlabs server?

rapid sparrow
#

u aren't supposed to run applications in gitlab servers

#

run at your own server

short peak
#

optionally, you can redirect output to a file, but you wonΒ΄t be able to see. You then will need to read the log file πŸ˜„

rapid sparrow
#

at which u wished to run it

rapid sparrow
#

u are supposed to target some external infrastructure outside of it

#

connect this external infrastructure and test it there

#

it is common having staging copy of low powered infrastructure for such testing purposes

worthy agate
rapid sparrow
# worthy agate can you explain it more deeply?

CI infrastructure should be containing only CI agents.
For example if u use public Gitlab runners, they run on some dedicated machines made for this purpose only and nothing else
if u use self hosted runners, u should have dedicated servers that have running Gitlab agent and nothing else.

For your application infrastructure to deploy something.
U should have created separate specific server. For example virtual machine in cloud provider. It should be having assigned its own ip address / DNS whatever.

if u wish having in CI deployment script straight to server
then your CI should be having in simple situation... SSH key with access to application server
it should connect over SSH to this application server and deploy into it.

#

as simple newbie friendly recommended choice... i usually recommend using Ansible for this. Because it is idempotent solution (u can rerun it many times to achieve same result. U can continue any script rerun even if u had previous one interrupted)

worthy agate
#

hmm, I removed the -d and the docker logs

    stage: deploy
    before_script:
        - chmod 400 $SSH_KEY
    script:
        - ssh -o StrictHostKeyChecking=no -i $SSH_KEY root@64.226.124.177 "
            docker login -u $REGISTRY_USER -p $REGISTRY_PASS &&
            docker ps -aq | xargs docker stop | xargs docker rm &&
            docker run --name i-will-never-change-my-name -t -p 5000:5000 $IMAGE_NAME:$IMAGE_TAG &&
            docker ps " ```

but now looks like it stuck, its waiting me to enter something
rapid sparrow
#

So your CI CD could be having next workflow:

#

CI workflow -> Builds docker image and saves to docker registry under some tag

#

CD workflow -> Runs ansible script, which connects to application server, where removes previous deployment and runs docker module to raise container

rapid sparrow
worthy agate
rapid sparrow
#

u a already connecting over SSH to your server ^_^

rapid sparrow
worthy agate
#

btw, now its showing the docker ps, in digitalocean console

#

the docker container details

worthy agate
rapid sparrow
# worthy agate btw, I have all cmd commands in docker-compose files, does it changes somethinkg...

it depends on how u write it.
CMD python3 app.py will make it usually called over shell in the same way as in docker-compose file, when u add it as command: python3 app.py
CMD ["python3", "app.py"] is different, since it calls something directly without shell
(That is assuming u did not override anywhere entrypoint and it is default one equal to null, which u can observe in docker inspect your_image_name)

worthy agate
#

do I run docker isnpect your_image_name in pipeline?

rapid sparrow
#

@worthy agate recommendation to read btw this book

rapid sparrow
worthy agate
#

ok (

worthy agate
#

is the fact that I dont have the python commands in dockerfile, may cause issue that I cannot deploy and run the project in digital ocean?

rapid sparrow
#

debugging docker without local access for debug is a bad idea

#

get local linux shell for your dev PC (Kubuntu 22.04 LTS is nice distro), install docker, debug docker image locally. push fixed code. proffit.

worthy agate
rapid sparrow
#

u told me there is difference. u run with compose at dev, and with direct docker cli command at application server

#

run at application server with compose
or run at dev server without compose too, to have properly matching environments

worthy agate
rapid sparrow
#

pretty much. it just has different GUI from kubuntu

rapid sparrow
#

as multi window terminal by default

#

at console level they is no difference though

worthy agate
#

so the difference is only in GUI, right? between Kubuntu and Ubuntu

#

if yes, I think I will keep using ubuntu

rapid sparrow
worthy agate
worthy agate
#

now I have to go back to learning routine ))

exotic crown
#

Yeah the pipeline should just build the image. Interactive programs can be a problem. like installing tzdata you will end up using the environment variable so it doesn't get stuck waiting for you to enter the country code and timezone

stuck onyx
#

hi i am trying to use github and git and how do i make the git clone not make a folder on clone

exotic crown
#

it will make a folder

stuck onyx
#

also how would you use git clone on a private repo

stuck onyx
exotic crown
#

there might be, but why

stuck onyx
#

for it not to make a folder on clone

exotic crown
#

what does that accomplish for you compared to having it make a folder?

stuck onyx
#

not in a folder

exotic crown
#

couldn't you just give it the proper path to the template file?

exotic crown
#

google indicates that to just have it use whatever current folder is, you do git clone <repo> .

stuck onyx
#

but do you know how to git clone a private repo without ui?

exotic crown
#

depends on where you are cloning it from. Long story short you have to be authenticated. authentication options include username+password, ssh key, or other platform specific access tokens.

stuck onyx
exotic crown
#

I believe github switched to requiring an access token or ssh key for auth not too long ago

stuck onyx
astral apex
#

You should be able to just put a . after your URL to clone into your current folder

astral apex
stuck onyx
stuck onyx
astral apex
stuck onyx
#

Access

astral apex
astral apex
#

What are you trying to do?

#

That’s what GitHub removed support for
It miiight work with a PAT
But you might need SSH

astral apex
#

Why don’t you have a console?

stuck onyx
astral apex
#

That doesn’t look right, but if it works then alright then

#

What do you need help with then?

stuck onyx
#

i think that is it other then pufferpanel and templates lol

#

with adding git a requirement witch you can't help with

astral apex
stuck onyx
astral apex
#

Probably not
I’ve never hear of that

stuck onyx
main shard
#

None

modern jay
#

hwel

quasi sphinx
#

NaN

pine night
#

hey guys what do you use for the script to auto restart whenever there are any changes, I have to manually quit and restart everytime i introduce some changes

short peak
# pine night hey guys what do you use for the script to auto restart whenever there are any c...

I usually do nodemon (node) but I know there are other alternatives other there - https://stackoverflow.com/questions/49355010/how-do-i-watch-python-source-code-files-and-restart-when-i-save

pine night
blissful moth
#

Hi ^^
I would like to analyze project with SonarCube and have some problem with visualizing coverage.
Here is the part of the sonar-project.properties I've set:

sonar.sources=./my_package/
sonar.tests=./tests/
sonar.coverage.reportPaths=coverage.xml

Before running sonar-scanner I've installed pytest-cov and created coverage.xml with pytest --cov=./gspread --cov-report xml.
Unfortunately, after running sonar-scanner in sonarqube I still see coverage 0%.
The structure of my project is:
my_project/
----my_package/
----tests/

I run sonar-scanner from my_project directory. Can anybody help me? Maybe I'm doing something wrong. I'll appreciate every hint on this ^^

blissful moth
#

I solved it, somehow sonarqube wasn't able to launch to coverage.xml, but simply running sonar-scanner Dsonar.python.coverage.reportPaths=coverage.xml worked

worthy agate
#

@rapid sparrow sorry for pinging you
but i finally deployed the app to digital ocean). Thanks man!
Have not done reading the book yet, half of the book left to read

rapid sparrow
rapid sparrow
cerulean hollow
rapid sparrow
# cerulean hollow Is there a book like `docker deep dive ` for kubernetes?

Yes, there is. From same author as docker deep dive
https://www.amazon.com/Kubernetes-Book-Version-November-2018-ebook/dp/B072TS9ZQZ
Mega best seller. And already republished each year.

sick crest
thorny shell
slim drift
alpine horizon
#

is merging branch A into branch B the same as doing the opposite? if so whats the difference?

#

(specifically with Bitbucket)

thorny shell
#

the merge commit remembers the order of the "parent" commits, so e.g. git log --first-parent will show something different

#

that's all I can think of, though -- in particular, I'd expect the resulting tree to be the same

alpine horizon
#

so stupid me merged master into feature-branch, should I just leave it like this? and can I proceed to delete the feature branch?

willow pagoda
thorn portal
alpine horizon
#

thanks guys

thorny shell
#

yeah -- a merge commit, like any other, can be "thrown away". So if you hadn't published your accidental merge, just create another commit that's more like what you want.

old wasp
#

please don't advertise here.

worldly creek
#

Is there a tool/linter that will report cyclical imports?

rapid sparrow
worldly creek
#

hmm I was hoping for something more like a linter that would report errors into a code editor (like vscode)

thorny shell
worldly creek
#

Thanks for the help!

thorny stag
#

Piggy-backing off the merge question, I often merge master into a feature branch, run tests/CI, then if everything checks out, I merge that back into master. I assume that's a suboptimal workflow/idiosyncrasy I have developed. Is there something more typical? Maybe rebasing the feature branch onto master first?

thorny shell
#

I don't see anything wrong with that.

rapid sparrow
thorny shell
#

rebasing is an alternative; it has the benefit that the resulting history looks cleaner.

rapid sparrow
#

with rebasing master to feature branch u have cleaner git commit history.

#

no extra merging commits will be in feature branch

#

and u will be able to merge back to master with single merge commit

thorny shell
#

well, that's the case regardless.

rapid sparrow
#

(merging commit is desired to be in master for easy revert of the merged PR, but u don't desire multiple merge commits from same branch/PR)

thorny stag
#

Ahh, thank you; up till this point I had accepted multiple merge commits as a fact of life.

thorny stag
rapid sparrow
# thorny stag Ahh, thank you; up till this point I had accepted multiple merge commits as a fa...

u can do even further. u can enable in your github settings for Merging with Squash and using it as main merging strategy. (in general perferable choice for merging from feature branches ^_^)
it will merge your PR/branch as one commit into master

u can do same manually with running
git rebase -i master and replacing for every commit except first one pick to squash. Save it, and it will make feature branch rebased/squashed into single commit as well

rapid sparrow
rapid sparrow
#

under the hood each git runs on local and remote repos that it syncs with your commands

#

we just pointed it more explicitely in this case, to avoid switching to master for fetching it

#

so we could rebase latest remote master to feature branch

thorny stag
#

Gotcha. My work's policy in theory is to squash from feature branches, but usually that's only for a sprint branch to master. I will definitely set that up. πŸ™‚ And the syntax explanation makes sense, thanks. I often just do git fetch without getting more specific.

heavy knot
#

hello peeps

#

I am deciding which python language server I want to run with

#

I am also wondering if there are other tools I should integrate into my ide (nvim)

#

apparently python-lsp-server implements jedi

thorny shell
#

I've been using python-lsp-server for a while and it seems OK

#

I assume that pyright is awesome, since Microsoft know how to do programming-language stuff, but I haven't actually tried it

heavy knot
#

my issue with pyright is that it's only a subset of pylance functionality which Microsoft is privately licensing

thorny stag
#

I set up python-lsp-server with nvim and it works great. I only chose it since it worked without issue with nvim-lspconfig (https://github.com/neovim/nvim-lspconfig) whereas pyright didn't. I like that plugin since it gives standardized and simple configs you can link to in your lua or vimscript config file for neovim.

GitHub

Quickstart configs for Nvim LSP. Contribute to neovim/nvim-lspconfig development by creating an account on GitHub.

wise ore
#

Hello, we managed to develop ourselves into a very... creative branch configuration and now i'm just very unsure how to get this done in the first place:
There is a private repository X containing main and demo, which are branches that have diverged pretty substantially from another; demo stemming from main. There is no way they'll ever be merged again and development common to them is just handled via cherry-pick. This feels extremely incorrect, and if someone has a better scheme to handle this, i'd be happy to hear it, but that's not the main question.
There is a public demo repository Y which is a snapshot of X:demo at a certain commit. This snapshot has been created by copypasting the entire repo, deleting .git to get rid of the commit history (and then, as this wasn't bad enough already, of course, making some more changes. These changes however were almost only deletion of code that will very likely never be touched by any commits in X again and may as well get deleted there). We would like to steadily update Y:main from X:demo, but ideally without dragging commit history, dates, objects and author names present in X into Y before this "snapshot" commit into Y. Now my question is: how could that be done?

[X]
 | O --- O --- O --- O --- O --- O <-main
 |       '-- O --- O --- O* --- O+ --- O++ <-demo

[Y]
 | O** --- O --- O {? --- O+ --- O++} <-main

O** created from copypasting O*
How to get the changes introduced by O+ and O++ into Y without leaking other commit info from X into Y?

It would be possible to just recreate the entire Y repo if necessary.

tawny temple
wise ore
tawny temple
#

It will be a diff between whatever branches you want. So you could diff between X:demo and Y:main

#

That would result in everything in X:demo to be pulled into Y:main if it's not already there. Stuff in X:main won't be used since that's a different branch than what was given to git diff

wise ore
#

The problem is that demo in its early stages still contains elements of main we forgot to weed out properly.
I guess it may be a really good idea to create a new public_demo branch in X, i'm gonna maybe experiment around that

#

Thanks for the input; even though there's no conclusion it's given me some new ideas

tawny temple
#

If it's entire files you want to exclude, I think git has ways to do that when running a diff.

#

If you want to exclude specific lines/blocks of code then I am not sure

heavy knot
#

Hey peeps, what are your favorite hooks to use with pre-commit?

My pre-commit runs black, ruff, isort, mypy, codespell, interrogate.py, and then my tests with pytest

tawny temple
#

Other than that, just black, flake8, and isort

#

Maybe I should start running tests before commiting... but I feel like that can take too long and would become annoying

finite fulcrum
#

I tried it once and it was a bit annoying on commits I wa nted to run linting on but knew tests wouldn't be affected

wise ore
# wise ore Thanks for the input; even though there's no conclusion it's given me some new i...

In the very unlikely chance anyone gets value out of it:
After trying stuff out for an entire day, corrupting and redownloading repos, i now effectively have a local repository setup to track X/demo on an unpublished Y:demo branch and resigned to just cherry-picking from it into Y:main. This involved git remote set-branches origin main, git remote set-branches private demo and git remote set-url --add --push private __DO_NOT_PUSH__ to prevent ever accidentally pushing back from Y somehow. The commits aren't the same, so the histories are completely different but the repo's contents are absolutely equal as indicated by git diff. It works.

gaunt forge
#

Hi, I'm tinkering with schedule [^1] to run some cron jobs. How do you guys run schedule itself as a daemon job that starts automatically at startup?

I'm on Mac + Linux. I don't want to use launchctl or systemd to be honest. I'm thinking of crontab with @reboot attribute. But this forces me to use crontab which ruins the whole reason why I chose to use schedule in the first place.

[^1] https://schedule.readthedocs.io/en/stable/index.html

brazen forge
# gaunt forge Hi, I'm tinkering with `schedule` [^1] to run some cron jobs. How do you guys ru...

which ruins the whole reason why I chose to use schedule in the first place.
if the reason is having the scheduling logic be in Python itself, then yes, the code that launches the scheduler needs to be launched as you mentioned.

I've recently done something similar, but using a cron-like library in a program deployed to Kubernetes (which takes care of the launching (and re-launching) part for me.)

BTW, I've seen apscheduler getting recommended as a Python library for this as well.

gaunt forge
brazen forge
#

oh no, I'm not saying you should use k8s, no
just giving some context with a recent experience

elder solstice
#

Is there a tool that can tell me which dependencies in my requirements.txt are unused in a package so I can prune them?

next scroll
#

it can highlight both unused deps, and missing deps

elder solstice
#

I'll give that a try, thanks!

alpine horizon
#

so I just had to resolve a conflict to merge the fature branch to master, so I did a git pull origin master modified the code, git add ., git commit, and then when I do git push origin feature_branch it says: Everything up-to-date and the commit dosent show up in the commit history, why??

#

in tihe output of git status it says: interactive rebase in progress; onto <commit hash>,
what am I supposed to do to exit from it?

thorny shell
#

try git rebase --continue

#

@alpine horizon ^^

distant silo
#

Hello all! Looking if someone can help me with a Python script for Maya. I am not a scripter, just trying to make quality-of-life tools for myself. Basically I am making a one-click export, I got it working for individual models, but when exporting a group it only exports the group with nothing inside. Not sure what's going on, I tested just normal export selected and had the same issue, so I am not sure what I am missing. SOS, thanks in advanced!

indigo zenith
flat lotus
#

Sebastian Ramirez also does that which confuses me

flat lotus
zinc hinge
#

(not related to Python) Miro newbie question : how can I switch to viewer (read-only) mode on a specific board for not accidentally modifying any visual element ? currently I have editor permission on a board, after few minutes of google search, I know that I can turn on presentation mode, however I still can modify things.

thorn musk
#

Hi ! i'm using poetry as a package manager and since i upgraded it (Poetry (version 1.4.0)) the command poetry install is really verbose by default and i'm looking to change the default verbose setting. Can someone help me pls ? ty
(ping me if answer)

ionic crest
#

progress

#

this is for turning python code into minecraft builds

heavy knot
thorny shell
#

me neither

candid juniper
#

hey so i am looking at how i should manage python environments and omfg this is too much. wtf should i even be using these days? pyenv? venv? virtualenv? conda? poety? just use the installer from python.org? i am losing my mind lol

thorny shell
#

use the simplest thing that works.

#

start with "requirements.txt" and pip.

#

if you're building software for your employer, they might have standards; you'd have to follow them.

#

But if you're just doing stuff for yourself, keep it simple.

candid juniper
#

this is just for me learning python in my own time

thorny shell
#

unless you actually want to learn pyenv, venv, virtualenv, conda, or poetry ... stay away πŸ™‚

#

those all solve problems that you either don't yet have, or don't yet know that you have.

candid juniper
#

ha fair enough. for now i just installed python with the pkg for mac on python.org and it works

thorny shell
#

sure

#

pro tip: your mac already had a reasonably-recent version of python.

candid juniper
#

true although i read about some issues people run into with homebrew updating python as well so i just went with the official install

smoky compass
#

Is there any tool or command of a larger tool (eg a linter) which can list all the direct dependencies in a project?

We had a situation recently where a direct dependency had not been listed in the dependencies but everything had been working because it was also required by a different direct dep and so was still being installed eventually.

We would like to avoid that sort of oversight if possible

restive jasper
smoky compass
#

That doesn't solve the issue though.

  • package A is required by our code
  • package B is required by our code
  • package A is also required by package B

We would have a working project with a requirements.txt that only contained package B.

restive jasper
#

yes but pip install will install all dependencies

#

and pip freeze will list everything what was installed

#

therefore you will have reproducible environment

willow pagoda
#

!pypi pipdeptree is probably what you're looking for, although im not sure how it determines top-level dependencies

rancid schoonerBOT
restive jasper
#

pipdeptree also shows only installed packages. Only output format is different

brazen forge
#

are you looking for something like pipreqs?

#

!pypi pipreqs

rancid schoonerBOT
willow pagoda
#

ah right

alpine horizon
#

are there any benefits in using absolute paths in production (on code that runs in cloud)?
I feel like its always a mess to find the "absolute shared path" and concatenating it to the other part of the path, and many times it differs from your local enviroment, so testing the code locally without modifying it a bit is many times impossible, what do you guys think?

#

absolute paths are just a headache in my experience

restive jasper
#

With docker and k8s we use absolute paths. I don't know if it is a best practice or not

rapid sparrow
elder solstice
#

I have a bunch of separate Python packages in the same repo that depend on each other. Each package is managed by Poetry. How can I set up my build scripts such that when I build a downstream package, only the upstream packages that have been changed are rebuilt?

rapid sparrow
elder solstice
#

e.g. let's say I have A -> B* -> C -> D*. (An asterisk indicates that the package was modified)

Right now, each time I build D, I have to rebuild A, B and C to make sure they are up to date. But I only want to rebuild B and C.

elder solstice
#

You may ask why that is the case. Originally, everything belonged to the same package, but the code has expanded significantly since then, so I am transitioning the codebase to a polyrepo. The current state is like an intermediate step where the modules have been decoupled to form their own packages

alpine horizon
tepid light
elder solstice
#

Yeah, but my code isn't there yet, so I wonder whether there is a way to get that working for the meantime

tepid light
#

The polylith source code accomplishes that through AST parsing and analyzing the imports. Maybe you need something like that?

elder solstice
#

I should have mentioned this earlier: each package has both JS and python components (basically frontend/backend), so I would prefer something that works on them jointly

tepid light
#

Would hashing the source files be a solution (somehow)? Comparing to a previous value.

elder solstice
#

I don't want to build my own change detector xD

thorn portal
elder solstice
#

That sounds promising (especially since I am currently using Makefile to coordinate the setup/build/test processes for the JS and python components within each package)

#

I will take a look, thanks!

rapid sparrow
thorn portal
paper moss
#

Hello people,
I have an scrapy project:
For that scrapy project I need python2.7, 3.6 and 3.8. So everytime I switch versions I need to switch of virtual environments and every virtual environment has its own packages installed.
My question is, can I make 3 docker containers ONLY with the packages installed in every virtual environment, and connect from the outside ?

I mean running scrapy crawl nameofthespiderfrom the outside and having 3 docker containers as environment (depending on which python version I'm using) . Instead of making source venv2.7/bin/activate or source venv3.6/bin/activate or source venv3.8/bin/activate connect through docker.

Thanks

restive jasper
#

Nope, docker image always will contain full filesystem. However it is layered...

#

So you can build base docker image with only OS (or use pre-built ubuntu/alpine available).
Then you can build three more docker images, both will have same base image in FROM

#

This is if you want to use docker for multiple python versions management. For local development you could use pyenv instead.

stone oar
#

@thorny shell @elder solstice hi

paper moss
restive jasper
#

with preinstalled packages?

#

How much packages you want to preinstall? I have experience with 500 anaconda packages in one environment, at this point dependency conflicts start to bother us.
I believe each project should have it's own environment and it's own (minimal) requirements.txt

#

or poetry's pyproject.toml

paper moss
restive jasper
#

Will developers use local docker to work with it?

#

"I mean running scrapy crawl nameofthespiderfrom the outside" -- scrapy will have to be installed inside container image as well.

#

For me it's not quite clear what is "outside". They will run container from "outside" (outside = their local host system), and they can override default ENTRYPOINT/CMD if they want... Or even run /bin/sh as CMD. The CMD binary should be built inside image.

#

Maybe use mounts/volumes, but meh... Are developers actually willing to do that?

paper moss
restive jasper
#

There are two possilbe workflows:

  1. local debug / local development - personally me would prefer just to use pip, with caching proxy to speed up downloads (although downloads are still cached locally)
  2. good cicd pipeline - should build a new docker image with the application on each commit - run everywhere: dev, test, stage, prod environments
smoky compass
#

Just a library i wrote for work

agile stag
#

Can I make a Dockerfile without installing Docker?

thorny shell
#

sure, a Dockerfile is just a text file

#

you can't do much with it, though

agile stag
thorny shell
#

🀷

#

if they expect you to create a working Dockerfile, that will probably be hard unless you have Docker installed.

agile stag
#

I hate Docker

#

Takes up too much god damn space

#

DL a 7 GB application just to ensure a dockerfile is working properly for them to use. Unreal.

#

Well the dockerfile is made. They never said to build an image for it.

exotic crown
#

lol, how do you know it works as intended if you didn't even build and test it? Sounds like the person expected that you were developing this to be containerized, and it sounds like you weren't. But you sent an untested dockerfile over anyways. Should have just told them its not developed for containers

tepid light
#

There’s also Podman if you have issues with Docker, with basically the same API & features.

rapid sparrow
rapid sparrow
#

you can cleanse docker cache at any moment with running
docker stop $(docker ps -a -q), stop everything
docker rm $(docker ps -a -q), remove all containers
docker system prune --volumes -a will cleanse all possible cache of images

paper moss
sullen geyser
#

Hi there! I practice karate and I'm planning to create a ranking system in Norway since it currently doesn't exist here, although it is common internationally. I envision a ranking system where organizers of national karate tournaments in Norway can input the results into a program or website, and based on that, generate an updated leaderboard. Do you have any tips on how I can get started or what I need to know?

thorny shell
#

I'd search Google for other leaderboard projects -- I imagine some exist.

#

Then see what tech they use, and try to understand it.

agile stag
#

Taking me so long to figure out how to containerize my app

#

It’s taking longer than actually finishing my app

agile stag
#

Actually sick of this containerizing crap

flat lotus
#
  1. Containerization is not too hard for basic use cases once you handle it at least once
  2. Please, stop with so much ranting and negativity. If you want help β€” you can ask for help, and I'm sure people here will help. Otherwise I'd ask you to keep this to yourself.
flat lotus
#

That is not a reason to rant β€” that's a part of the profession.

agile stag
flat lotus
#

Listen, I am not trying to argue. I am pointing out that this channel is not for ranting. It's for people helping other people with specific problems.

agile stag
#

ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF
#

The error that I received from my terminal

flat lotus
#

I will not. However, If you share the dockerfile with us, I am pretty sure someone will.

agile stag
#

Dockerfile.dev

# Fetching the latest node image on alpine linux
FROM node:alpine AS development

# Declaring env
ENV NODE_ENV development

# Setting up the work directory
WORKDIR /cth-controls

# Installing dependencies
COPY ./package.json /cth-controls
RUN npm install

# Copying all the files in our project
COPY . .

# Starting our application
CMD npm start
rapid sparrow
#

Looks like possible incorrect installation

agile stag
# rapid sparrow On which command, `build`? Print us output of `docker version`
docker version
error during connect: this error may indicate that the docker daemon is not running: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.
Client:
 Cloud integration: v1.0.33
 Version:           24.0.2
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        cb74dfc
 Built:             Thu May 25 21:53:15 2023
 OS/Arch:           windows/amd64
 Context:           default
rapid sparrow
rapid sparrow
agile stag
# rapid sparrow Hehe. The error is there and clear. Your docker daemon is not available (but it ...

I just restarted my laptop and it showed that error. I opened Docker desktop and this is what it shows now.

docker version
Client:
 Cloud integration: v1.0.33
 Version:           24.0.2
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        cb74dfc
 Built:             Thu May 25 21:53:15 2023
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Desktop 4.20.1 (110738)
 Engine:
  Version:          24.0.2
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.4
  Git commit:       659604f
  Built:            Thu May 25 21:52:17 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
rapid sparrow
#

That is better

agile stag
#

I've always had the Docker desktop on when I was trying to build my docker image

rapid sparrow
rapid sparrow
# agile stag I've always had the Docker desktop on when I was trying to build my docker image

Docker works in ideal way
https://docs.docker.com/engine/install/ubuntu/
If u install Docker Engine at linux

It is fully CLI version. That uses no virtualization. Docker client and docker server-daemon work natively. Daemon grabs current Linux OS core/kernel and reuses it for its operation. Zero additional overhead.

Requires having printed OS Linux in your docker version for client and server. (For correct functionality without any problems at least)(WSL i heard can run real Linux in WSL2?)

But u a running smith like Linux imitated by windows core for Client (Frankenstein)
While Docker Desktop installed creates a SECOND virtual machine with Real Linux running inside

So when u execute CLI docker, it is connected remotely from your Windowsish (os arch Windows) Linux 1 to this virt machine (Real Linux 2 - os arch Linux) containing docker server inside to use it (thus it kind of remains not available fully at current OS u a because u speaking with it only remotely)

Tldr: all problems from u using Docker Desktop at Windows, instead of Docker Engine at Linux.

Docker Documentation

Jumpstart your client-side server applications with Docker Engine on Ubuntu. This guide details prerequisites and multiple methods to install.

#

We can assume, that when u enable Docker Desktop, it brings online this remote virtualized real Linux #2, and that is why it starts to work

With real Docker at Linux it would have worked locally via docker.sock and had no such complications and problems

#
  • Install Linux as dual boot (or main OS)
  • find WSL to run real Linux (via virtualization to achieve OS arch Linux printed)
  • create normal virt machine with Real Linux
  • use remote server with real Linux
    Any option will work

Then install Docker Engine, and everything will work fine

#

Continuing to use docker in the way u a using right now will bring you only new problems in a future. Docker volumes, essential part will not function correctly too, since they still be activated at second remote OS

#

TLDR: U should have installed Linux, instead of using Windows

agile stag
#

Well I must say thank you for putting in the effort in helping me troubleshoot the issue that I have been experiencing.

agile stag
restive jasper
#

@rapid sparrow are you trolling?

rapid sparrow
# restive jasper <@370435997974134785> are you trolling?

Only half joking.
DevOps engineering tools for infrastructure as a code approach in web development are natively supported by Linux only.

They are meant to make deployment to Linux servers first, nothing surprising that they work correctly only from Linux

For Windows and MacOS only very very limited partial support is present in some of tools

#

Considering that Docker is OS depended tools and its ecosystem is rich and supported for Linux only, u will never get the same level of usability anywhere but in Linux

#

Preferably with PC CPU architecture in amd64. Arm64 started to grow in server usage popularity but still has unresolved kinks and level immaturity.
So even if u install Linux to modern MacBook with M processors in arm64, u will still experience some troubles in ecosystem and software. Magnitudes less troubles than using another OS than Linux though

flat lotus
#

I'm pretty sure he wants to run an equivalent of hello world so what you're saying doesn't apply for his specific case.

rapid sparrow
flat lotus
#

I am sorry, I do not run windows so I might be less knowledgeable in this:

Can't he run a regular node server in docker on windows?

rapid sparrow
# flat lotus I am sorry, I do not run windows so I might be less knowledgeable in this: Can'...

short story, no. he can't.
Docker technology is OS depended and CPU architecture depended.
Windows ecosystem of Docker is very close to zero (official node.js is not present too there)

in Windows he has choices only to use

  • Regular VMs of Linux
  • using WSL with Windows Linux, that in end with Docker Desktop will require him second Linux virtualized with proper kernel (still requires real linux in the end running)
  • using WSL2 may be possible to have Linux kernel running fully for the WSL virtualized OS (it is still overhead in virtualization to have a second OS running)

or he can skip all those problems and just install Linux to dual boot.

There are no other options... actually there will be options but they are in beta test

#

in some distant future (give it 5 years), Docker will migrate may be to be built on WASM (currently in beta available), that is OS and CPU architecture independed

#

then it will be possible running Docker ecosystem (if other developers, maintainers of all ecosystem will migrate too), in other OSes

thorn portal
#

what!? where can i read more about this WASM switch? that's a proper TIL for me.

rapid sparrow
#

there is also an option to use Buildx for silmutenous build of docker images in different CPU architectures. not sure if possible to run Buildx building from Windows for Linux OS. it is very fragile and creates overhead to create multiple docker images though. Wasm has no such disadvatnage (U can build one WASM docker image to run everywhere)

thorn portal
#

i find it fascinating that people are doubling down on the JS ecosystem, like WASM and whatnot, when JS as a language is.... let's just say sub-optimal in design.

rapid sparrow
#

although i hear that JS is very tied to running WASM at least in browser (due to its mature ecosystem, that is already secure and mature) (not sure if i got it correctly though)

thorn portal
#

hmm. interesting, the vibe i got a few years ago is that everything is compiled down to javascript, maybe i understood wrong.

rapid sparrow
#

to reuse browser ecosystem of maturity and security for javascript

#

you know.. i don't care to which language it is compiled in the end (be it assemble or javascript) as long as i am not impacted significantly in performance, weight of user dowloaded files and any memory and etc problems

#

as long as they managed to provide making front in something not javascript during development, it is already fine to me

#

Docker wasm is probably runnable without js though, since it is not run in browser

elder solstice
# thorn portal i use `task` (https://taskfile.dev/) for most things, and there is a section the...

Ok I think I have set up the builds properly. However I am running into the following problem, not sure whether that's solvable by Task:

Basically I have a dependency chain like so:

A -> B -> C
  \    /
   ----

Now, I have set up a Taskfile to build each of them. In B's Taskfile, I include A's Taskfile such that A is built before B. Likewise for C.

Since the build for A is quite expensive, I have specified sources in A's Taskfile to avoid unnecessary builds.

However, the problem is that B stores A's checksum in B's own .task directory, and the same thing applies for C. As a result, after I update A, when I try to build C, the following happens:

[Given that A has been updated:]

  • C:build depends on A:build.
    • A:build computes checksum and finds it to be different than that stored in C/.task. So, the task is re-run.
  • C:build depends on B:build.
    • B:build depends on A:build.
      • A:build computes checksum and finds it to be different than that stored in B/.task. So, the task is re-run again.

The result is that A is being built twice even though it only has to be done once. What can I do so that it only builds once?

  • I have tried using run: when changed, but that appears to only work if the task is called from the same Taskfile. In my case, it is called from two different files (B and C) so it doesn't apply.
  • I guess I can remove the transitive dependency (A -> C). But this may lead to the build breaking if B no longer depends on A. This solution would not be maintainable for more complex dependency graphs.
thorn portal
thorn portal
# elder solstice Ok I think I have set up the builds properly. However I am running into the foll...

on top of the root level taskfile no-go "soution"
there is one hacky solution
export PACKAGE=a; mkdir -p .task/checksum; find ../$PACKAGE/.task/checksum -type f -print0 | xargs -0 -I {} bash -c 'cp {} ./.task/checksum/$PACKAGE-$(basename {})'
this yoinks the latest a checksum into the current directory's .task/checksum with the correct a- prefix, this would skip a's build in b directory for example

there is also this issue: https://github.com/go-task/task/issues/852 - no traction thus far

elder solstice
#

export PACKAGE=a; mkdir -p .task/checksum; find ../$PACKAGE/.task/checksum -type f -print0 | xargs -0 -I {} bash -c 'cp {} ./.task/checksum/$PACKAGE-$(basename {})'
Hmm... interesting

thorn portal
#

it made a lot of assumption though.. not fit for production usage at all
but the principle of copying the included taskfile's .task/checksum seems to work

elder solstice
#

yeah so perhaps I can create a "checksum repository" that syncs together the checksums stored across different packages...

#

instead of this not-very-readable shell command, I can call a Python script that writes the given checksum, and Python will propagate the checksum to the other packages

thorn portal
#

push based might be a bit hard, because you would need to know ahead of time what consumes packge A
pull based is probably easier, i.e. package B know it needs package A and grab that itself

elder solstice
#

hmm true

#

yeah I can just lookup the checksum, that would simplify things

elder solstice
#

Ok I think I got this figured out.

I will add a Python script python checksum_repo.py put <key> <checksum> that updates the entry with the given key with the given checksum, returning 1 if the entry is updated as a result (otherwise 0).

Then, in A:build, instead of the default method: "checksum", I will use status: ["python checksum_repo.py put <key> {{.CHECKSUM}}"] to determine whether the task will run. Given this, the above example will trigger the following:

  • [Given that A has been updated:]
  • C:build depends on A:build.
    • A:build computes {{.CHECKSUM}} that is different from the stored one, so the command in status returns 1, prompting the task to be re-run. (Note that this also updates the repository with the new checksum.)
  • C:build depends on B:build.
    • B:build depends on A:build.
      • A:build computes {{.CHECKSUM}} again, but this is the same as the stored one, so the command in status returns 0. The task is no longer re-run.
thorn portal
# elder solstice Ok I think I got this figured out. I will add a Python script `python checksum_...

sounds really solid!

really neat usage of {{.CHECKSUM}} (to which i didn't know existed)
might start using this in my project now.
i think there might be an opportunity of building your package A and dumping it into /repo-root/A/dist/{{.CHECKSUM}}/output and have B read from that, this could potentially mean you can maintain a few versions of package A without needing to rebuild, if you hop around versions a lot that might make a difference in dev experience

elder solstice
#

Thanks! For my use case, I only need to maintain one version atm, but I will keep that in mind πŸ™‚

#

hmm, this might be an edge case, but since Task can execute tasks concurrently, I need a way to block the script if another instance of the script is currently writing to the file

rotund wyvern
#

is there a # type: ignore for ruff?

#

or even better #fmt: off -> #fmt: on

flat lotus
#

noqa

elder solstice
#

Don't tell me I have to pass the globs to python and have python calculate the checksum internally...

#

Maybe I can have a dummy task that stores the checksum to {{.ROOT_DIR}}/.task and read it in the real task?

elder solstice
#

This is kinda ugly but it works

tasks:
  build-python-checksum:
    internal: true
    dir: './python'
    sources:
      - '**/*.py'
    status:
      # This makes it so that `build-python` is aware of the new checksum during a dry run
      - echo {{.CHECKSUM}} > "{{.ROOT_DIR}}/.task/checksum/{{.TASK | replace ":" "-"}}"
  build-python:
    deps: [build-python-checksum]
    dir: './python'
    cmds:
      - echo "Do the actual work"
      # Only update the stored checksum if the task is successful
      - python "{{.REPO_DIR}}/tools/checksum_repo.py" put "$(pwd)/build-python" $(<"{{.ROOT_DIR}}/.task/checksum/{{list .TASK "-checksum" | join "" | replace ":" "-"}}")"
    status:
      # Avoid side effects
      - python "{{.REPO_DIR}}/tools/checksum_repo.py" check "$(pwd)/build-python" $(<"{{.ROOT_DIR}}/.task/checksum/{{list .TASK "-checksum" | join "" | replace ":" "-"}}")
thorn portal
#

Dear god, now I am sorry I led you down this path πŸ₯Ή

#

I am travelling at the moment, so I can't even look properly, but I felt like making a change for task to automatically pull included task file checksum should not be that hard 🧐

glad cradle
#

What SSH client y'all using? I'm on Windows trying to get into my AWS EC2 ubuntu instance but it's messing me around so I'm looking for an alternative to PuTTy that can use the .pem file instead of requiring me to convert it to a .ppk

thorny shell
#

are you sure Windows doesn't have an ssh client built in?

glad cradle
#

Even if it does, I doubt it'll easily allow me to specify the .pem file for auth

thorny shell
#

well I think the Linux version lets you specify a .pem, in which case I'd expect the one on Windows to do so as well

#
PS XXXXXCE:C:\Users\xxxxxxx [2023-06-20T08:41:40-07]> ssh -V
OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
#

lgtm

#

it's roughly the same program.

glad cradle
#

well that's annoying...

permission denied (publickey)

#

whatever tf that means... Obviously "publickey" is a super useful and descriptive problem statement πŸ™„

thorny shell
#

that means the private key you're using isn't allowed by the remote host

glad cradle
#

I just generated the damn thing in AWS... this is why I hate server admin. This shit never makes any sense

#

Even AWS itself can't connect to this thing...

#

Stupid af

elder solstice
#

I just realized that I have to pass in sources as a variable to achieve what I want (I want to use the above task as a base, and have the actual tasks pass in the output of their dependencies as part of the source files)

#

so I think I'll just roll my own checksum generator

#

something like this

from __future__ import annotations

import hashlib
import glob
import os
from pathlib import Path

import click

@click.command()
@click.argument('sources', type=str, nargs=-1)
def calc_checksum(sources: list[str]):
    """
    Calculates the combined checksum of the `sources` defined in a Taskfile,
    printing the result to standard output.
    """
    # This is based on: https://github.com/go-task/task/blob/main/internal/fingerprint/sources_checksum.go#L86
    # However, the implementation is different so they might not return the same hash

    pathnames = {
        pathname
        for source in sources
        for pathname in glob.iglob(source, recursive=True)
        if os.path.exists(pathname)
    }

    filepaths = {
        Path(dirpath) / filename
        for pathname in pathnames
        for dirpath, _, filenames in (
            os.walk(pathname) if os.path.isdir(pathname) else [(os.path.dirname(pathname), [], [os.path.basename(pathname)])]
        )
        for filename in filenames
    }

    h = hashlib.md5()
    for filepath in sorted(filepaths):
        h.update(filepath.name.encode())
        h.update(filepath.read_bytes())

    print(h.hexdigest())

if __name__ == '__main__':
    calc_checksum()

not sure how robust this is

#

I hope I'm not shooting myself in the foot by doing this lol

#

So now I have this

tasks:
  build-python:
    dir: './python'
    vars:
      SOURCES: '{{.SOURCES | default ""}}'
      GENERATES: '{{.GENERATES | default ""}}'
      # Cannot use checksum as a variable, perhaps due to the variable being only evaluated once even when included multiple times?
    cmds:
      - echo "Do the actual work"
      # Only update the stored checksum if the task is successful
      - python "{{.REPO_DIR}}/tools/checksum_repo.py" put "$(pwd)/build-python" $(python "{{.REPO_DIR}}/tools/checksum_calc.py" {{.SOURCES}} {{.GENERATES}})
    status:
      # Avoid side effects
      - python "{{.REPO_DIR}}/tools/checksum_repo.py" check "$(pwd)/build-python" $(python "{{.REPO_DIR}}/tools/checksum_calc.py" {{.SOURCES}} {{.GENERATES}})
elder solstice
loud bear
#

the new vscode plugin for github actions is cool

potent cedar
#

Not sure if this is devops exactly so feel free to direct me to another channel.

I have a python web service written using aiohttp, which logs to stdout using the built-in logging module. I'd like to funnel these logs into some kind of web dashboard, so that I can inspect errors, see usage stats (ideally with fancy graphs), etc. I'd like something open-source and self-hostable, that can run on the same local box. A lot of the solutions I'm seeing (e.g. grafana) seem kinda heavyweight. Does anyone have recommendations for something more simple and lightweight?

#

I don't need any fancy features, I just want a step up from staring at lines of text in stderr lol

junior nexus
#

Is there anyone with a good knowledge of pyinstaller around here ? I'm losing my mind trying to bundle my app into an exe and can't seem get help when i make posts :/

vague silo
#

well, you just made the post a few minutes ago, so your best bet is to wait a moment :D I will check it out

slim maple
potent cedar
#

I want both errors and general metrics tbh

brazen forge
#

is Grafana Loki too much?

slim maple
brazen forge
slim maple
restive jasper
#

@potent cedar Grafana Loki is not that heavyweight. But if you think it's overkill for a single server, you probably end up reading & analyzing logs via tail and other UNIX utilities. For graphs you could use Graphite / Collectd+Sickmuse / Monitorix / Munin/ Vanilla RRD at your choice

potent cedar
#

sentry seems to have a weird not-FOSS license even though the source is available

brazen forge
#

right

brazen forge
#

lnav is great for analyzing logs locally
not sure if it supports plotting metrics

potent cedar
#

glitch is looking interesting, reading the docs now

restive jasper
#

But I would advice to use Grafana if you have resources, because it is an industry standard, especially for metrics (not quite industry standard for logs though)

slim maple
#

glitchtip is MIT

potent cedar
#

the thing is, the actual service I'm monitoring is designed to be ultra lightweight (it's using like 40MB RAM right now) so it would pain me to spend more resources on monitoring than actually running it lmao

slim maple
brazen forge
restive jasper
#

Prometheus is lightweight, have some built-in web UI, it's jsut not very convenient in comparison with Grafana

potent cedar
#

glitchtip says min requirements 512MB RAM, hmmmm

#

maybe I'll roll my own logging dashboard lol

slim maple
#

Sentry one is a nightmare

vague silo
#

if you run your service under systemd you already log to journald

potent cedar
#

oooh neat (I will be running under systemd, once I get my act together and write a unit file)

thorn portal
potent cedar
#

I mean, I get why they do it, but I don't want to use software written and maintained under that mindset

thorn portal
#

i am hosting sentry myself, it's a really complicated stack to say the least.
and their latest major version is slightly broken for months, so just be ready for some frustration if some things don't go your wayπŸ€·β€β™‚οΈ

vague silo
#

Sentry 9 was still usable. After that they added like 3 new databases and I couldn't even run it anymore because the Clickhouse thing needed CPU instructions I didn't have

worldly creek
#

In vscode with the standard Python extension, when I autocomplete a method definition on a class i'm building which is inheriting from a Protocol/ABC, it is generating an import at the top of the file for the param types from the method, but those types are defined in the current file, so it makes no sense and causes re-definition errors. Anyone know why and/or how to stop it?

#

I even have "python.analysis.autoImportCompletions": false in my settings

tame fulcrum
#

`dlopen failed: couldn't map "/storage/emulated/0/main-tigercodez-all-in-one-tool/dist/pytransform/_pytransform.so" segment 1: Permission denied

[Program finished] `

thorny shell
stable coral
#

Hey folks, any idea what can cause "ERROR: Could not install packages due to an OSError: [Errno 22] Invalid argument" when installing a local wheel? For instance when running "pipenv run pip install .\file\tables-3.7.0+gpl-cp310-cp310-win_amd64.whl"

#

it specifically fails at this stage:

#
Collecting numexpr>=2.6.2
  Using cached numexpr-2.8.4-cp310-cp310-win_amd64.whl (92 kB)
Installing collected packages: packaging, numpy, numexpr, tables
ERROR: Could not install packages due to an OSError: [Errno 22] Invalid argument
thorn portal
stable coral
#

ah thanks for the tip

#
ERROR: Could not install packages due to an OSError.
Traceback (most recent call last):
  File "C:\Users\Eric\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\commands\install.py", line 449, in run
    installed = install_given_reqs(
  File "C:\Users\Eric\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\req\__init__.py", line 72, in install_given_reqs
    requirement.install(
  File "C:\Users\Eric\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\req\req_install.py", line 800, in install
    install_wheel(
  File "C:\Users\Eric\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\operations\install\wheel.py", line 731, in install_wheel
    _install_wheel(
  File "C:\Users\Eric\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\operations\install\wheel.py", line 591, in _install_wheel
    file.save()
  File "C:\Users\Eric\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\operations\install\wheel.py", line 388, in save
    with self._zip_file.open(zipinfo) as f:
  File "C:\Users\Eric\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1530, in open
    fheader = zef_file.read(sizeFileHeader)
  File "C:\Users\Eric\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 744, in read
    self._file.seek(self._pos)
OSError: [Errno 22] Invalid argument
#

so it seems to fail while trying to unarchive the wheel?

#

perhaps the wheel is corrupted, it's tracked with git

thorn portal
#

could you cd into file directory and install tables-3.7.0+gpl-cp310-cp310-win_amd64.whl without all the \?

#

i have a feeling this is an issue with \, just a guess.. i don't use windows, but i recall it's usually \\ or something.

stable coral
#

same issue here

#

if the path was wrong it would show the path as the wrong argument I think

#

the weird thing is that it does download the subdepdendencies it seems like numpy and stuff

#

very confusing

thorn portal
#

oh right, i missed that.

stable coral
#

Yeah I've tried it but same result, this would fail immediately when opening the file

#

so I suspect the file might be corrupted, will ask my client

thorn portal
stable coral
#

good idea, it definitely works

#

so the wheel is just weirdly corrupted

#

thanks for your help

thorn portal
#

πŸ™Œ

versed basin
#

@surreal ridge oh hey clem

#

Trying kubernetes for the first time

#

Decided to do a fresh install on my os and now I'm feeling curious bout it

surreal ridge
surreal ridge
versed basin
#

I don't πŸ˜”

#

What would happen?

surreal ridge
#

You can still learn about it, but you can't really use its full potential running it in a single VM

#

There are simpler distributions like Minikube that will be easier to deploy

#

Do you now have your own server? If you want to take the full k8s route, I'd recommend getting an hypervisor (again :))

versed basin
#

Well, I have gotten my hands on a small laptop that I'm now using as a makeshift server :v

#

So hey

#

Perhaps I can do something with it

surreal ridge
#

What's makeshift?

versed basin
#

the term?

#

improvised

surreal ridge
#

Yeah even on an old laptop you can get proxmox - at least you'll be able to spawn VMs on-demand

versed basin
#

Sweet, I'll go all in then

#

Nothing better than diving into the ocean while barely knowing how to swim

surreal ridge
#

Honestly you'll learn a TON

#

On networking, linux systems, containerization, etc

versed basin
#

Sweet

#

How is the learning curve?

surreal ridge
#

Steep but honestly very satisfying: being able to spawn VMs on-demand, play with them etc starts to feel like magic

#

In a nutshell proxmox is exactly like VMware or virtualbox except it's an OS as a whole

#

you install it on your host (laptop) and Proxmox will come with a GUI that will allow you to create VMs by just uploading any ISO you'd like

versed basin
#

oooh that's nice

#

brb googling it

surreal ridge
#

some stuff might be outdated but I found the explanations to be nice

#

double check that your laptop CPU supports virtualization btw

#

That's pretty much the only thing that can really block you here

versed basin
#

Yup, finished checking

#

it does support virtualization

#

I'll see about installing it later

#

ty clem 🫢

rapid sparrow
# versed basin Sweet, I'll go all in then

@surreal ridge
Let's have it clarified that minikube spawns multi node/VM cluster for u. No need for virt other tech

Also, the most superior virt tech is Vagrant in this specific usage case (if not to use minikube), because it is VM as a code similar to docker containers

Recommending starting journey with book docker deep dive to docker first

distant epoch
#

What do you use to track you task in small personal teams (like 2-3 people)? Jira is too big for this and Trello is too simple. I'm also kind of sick of Attlassian, so I want to try somethin new. I found Linear and ClickUp, wdyt?

#

Integration with GitLab would be big plus

thorny shell
#

why not gitlab itself? Doesn't it have a sorta TODO list thing?

#

surely one of those is what you're looking for

surreal ridge
#

exactly this , if you consider gitlab issues as jira tickets, you pretty much have jira in gitlab

rapid sparrow
#

Assuming u will mention #Number of issue in your git commits, commits will be autolinked to relevant issue ^_^

distant epoch
#

How are those compared to independent tools I mentioned?