https://pulumi.com logo
Join the conversationJoin Slack
Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
plugin-framework
pulumi-cdk
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumi-service
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by Linen
contribute
  • m

    microscopic-dusk-80789

    03/21/2019, 1:57 AM
    can the project guarantee that ? 😛
  • s

    stocky-spoon-28903

    03/21/2019, 1:57 AM
    Not really - the intended use is for the
    pulumi
    CLI to be the entry point
  • s

    stocky-spoon-28903

    03/21/2019, 1:57 AM
    It’s generally not proven necessary to wrap it with anything
  • s

    stocky-spoon-28903

    03/21/2019, 1:57 AM
    If you want to look at embedding, the best place to start is in the
    pulumi/pulumi
    repo, at the command implementation for the
    up
    command
  • m

    microscopic-dusk-80789

    03/21/2019, 1:58 AM
    the thing I want to build is for ppl who dont know what a terminal is and have never heard the word CLI before
  • m

    microscopic-dusk-80789

    03/21/2019, 1:58 AM
    thats why I want to wrap it
  • m

    microscopic-dusk-80789

    03/21/2019, 1:58 AM
    Its unreasonable to ask my intended users to open a terminal.
  • s

    stocky-spoon-28903

    03/21/2019, 1:59 AM
    https://github.com/pulumi/pulumi/blob/master/cmd/up.go is the entry point you’re looking for
  • m

    microscopic-dusk-80789

    03/21/2019, 1:59 AM
    Yeah, I think Ive already gone a ways down this path, but i'm lost 😛
  • s

    stocky-spoon-28903

    03/21/2019, 1:59 AM
    Like I say, there is no API stability guarantee for the internals, so I wouldn’t be surprised if it breaks on a regular basis!
  • s

    stocky-spoon-28903

    03/21/2019, 1:59 AM
    In general, you’ll need to hook the engine into two other things: the language host and the resource provider plugins
  • m

    microscopic-dusk-80789

    03/21/2019, 2:00 AM
    let me look at what I have so far and you can tell my how wildly off base I am
  • s

    stocky-spoon-28903

    03/21/2019, 2:01 AM
    FWIW as far as I know no-one has yet tried doing this - certainly I haven’t 🙂
  • m

    microscopic-dusk-80789

    03/21/2019, 2:02 AM
    yeah thats what it looked like to me too after some googling but im willing to give it a shot
  • m

    microscopic-dusk-80789

    03/21/2019, 2:02 AM
    so I made a new
    filestate
    , then I tried to create a
    pulumi.RunInfo
    and call
    pulumi.NewContext
    on it, then finally call
    pulumi.RunWithContext
    with my
    pulumiContext
    and
    RunFunc
    (program)
  • m

    microscopic-dusk-80789

    03/21/2019, 2:03 AM
    the RunInfo has two addresses for servers,
    MonitorAddr
    and
    EngineAddr
  • m

    microscopic-dusk-80789

    03/21/2019, 2:03 AM
    just now I was playing around with spawning the pulumi-language-go process -- I thought that was the
    engine
    grpc server I was looking for at 1st
  • m

    microscopic-dusk-80789

    03/21/2019, 2:03 AM
    but then I looked closer and the
    pulumi-language-go
    also connects to something called
    engine
  • s

    stocky-spoon-28903

    03/21/2019, 2:04 AM
    pulumi-language-go is the runtime for go programs, not the engine
  • m

    microscopic-dusk-80789

    03/21/2019, 2:04 AM
    so, obviously im missing something here. I'll probably just have to run through it in the debugger when invoking it from the command line and watch wat it does
  • s

    stocky-spoon-28903

    03/21/2019, 2:04 AM
    The runtime makes RegisterResource RPC calls to the engine whenever objects are instantiated in the program
  • m

    microscopic-dusk-80789

    03/21/2019, 2:05 AM
    so, let me zoom out a bit
  • m

    microscopic-dusk-80789

    03/21/2019, 2:05 AM
    pulumi CAN run with just the cli right?
  • m

    microscopic-dusk-80789

    03/21/2019, 2:06 AM
    so, the scope of what I am looking for is contained for the most part in the
    pulumi/pulumi
    repo
  • m

    microscopic-dusk-80789

    03/21/2019, 2:06 AM
    is there an architechtural diagram of how the CLI works ?
  • m

    microscopic-dusk-80789

    03/21/2019, 2:07 AM
    it looks like it spawns multiple servers which talk to each-other over GRPC in order to do its job
  • m

    microscopic-dusk-80789

    03/21/2019, 2:07 AM
    and then it can optionally talk to some server that the pulumi company runs, presumably to store your state for you safely and securely
  • s

    stocky-spoon-28903

    03/21/2019, 2:07 AM
    Actually I think there is a video explaining it somewhere
  • m

    microscopic-dusk-80789

    03/21/2019, 2:07 AM
    is there a pulumi Daemon or something that the CLI is a client of ?
  • s

    stocky-spoon-28903

    03/21/2019, 2:08 AM

    https://www.youtube.com/watch?v=YMAe59BYzm4â–¾

Powered by Linen
Title
s

stocky-spoon-28903

03/21/2019, 2:08 AM

https://www.youtube.com/watch?v=YMAe59BYzm4â–¾

View count: 1