purpleidea / mgmt

Next generation distributed, event-driven, parallel config management!
https://purpleidea.com/tags/mgmtconfig/
GNU General Public License v3.0
3.65k stars 314 forks source link

Working on non-linux OS #766

Closed davidroman0O closed 3 months ago

davidroman0O commented 3 months ago

This is not an issue, this is for other people searching how to do it.

If you still want to work on other OS (your choice), well you can perfectly use VsCode and devcontainer with one Dockerfile

FROM ubuntu:latest

# Install dependencies
RUN apt-get update && \
    apt-get install -y \
    golang-go \
    git \
    build-essential \
    curl \
    vim \
    wget \
    && apt-get clean

# Set environment variables for Go
ENV GOPATH=/go
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH

# Install stringer and other required tools
RUN go install golang.org/x/tools/cmd/stringer@latest && \
    go install github.com/blynn/nex@latest && \
    go install golang.org/x/tools/cmd/goyacc@latest

# Install mgmt
RUN git clone https://github.com/purpleidea/mgmt.git /mgmt && \
    cd /mgmt && \
    make deps && \
    make

RUN mv ./mgmt /usr/bin

WORKDIR /workspaces

Just like that, it works and you can work with mgmt, if you need a release well... you have a Dockerfile now ¯_(ツ)_/¯

davidroman0O commented 3 months ago

I'm auto-closing it

@purpleidea this is not an issue, don't worry, i won't spam your issues

purpleidea commented 3 months ago

We have some unmaintained docker stuff in the docker/ folder. If you want to improve that you're welcome to. But I think it has limitations that makes it unsuitable for many types of automation you may wish to run.

davidroman0O commented 3 months ago

I will definitely take a look! mgmt is super interesting but i need to understand it a bit more and play with it!