Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update index page of Command for GA #4833

Merged
merged 6 commits into from
Jul 1, 2024
Merged

Conversation

thomas11
Copy link
Contributor

Basically

  • remove mentions of "preview",
  • add code for the examples in other languages, except the EC2/copy one where I don't have tested code at this point,
  • minor fixes.

Regarding the EC2/copy example: it spends about ~22 lines on provisioning an EC2 instance with pulumi-aws, with no usage of Command. I think it might be good to remove that part. I have working code in all languages that assumes the remote server exists and takes its IP as a config.

@thomas11 thomas11 requested review from lukehoban, mjeffryes and a team June 28, 2024 15:54
@thomas11 thomas11 requested a review from a team June 28, 2024 16:01
Copy link

Your site preview for commit 736ce9b is ready! 🎉

http://registry--origin-pr-4833-736ce9b4.s3-website.us-west-2.amazonaws.com/registry.

Copy link
Contributor

@cnunciato cnunciato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @thomas11, I noticed the chooser was kind of broken and the JS examples didn't quite work, so I took the liberty of pushing a commit to save you the hassle of fixing these things up. Hope that's ok!

Approving to unblock, but re this one:

Regarding the EC2/copy example: it spends about ~22 lines on provisioning an EC2 instance with pulumi-aws, with no usage of Command. I think it might be good to remove that part.

I agree -- and what's worse it that the relevant parts aren't even visible in the snippet because it's being cropped. Definitely support swapping this out with something else, but will leave that to you.

How about the "Using local.Command with CURL to manage external REST API" example? Do you have code in the other languages for that one?

Comment on lines 129 to 172
This example creates and EC2 instance, and then uses `remote.Command` and `remote.CopyFile` to run commands and copy files to the remote instance (via SSH). Similar things are possible with Azure, Google Cloud and other cloud provider virtual machines. Support for Windows-based VMs is being tracked [here](https://github.com/pulumi/pulumi-command/issues/15).
This example creates an EC2 instance, and then uses `remote.Command` and `remote.CopyToRemote` to run commands and copy files to the remote instance (via SSH). Similar things are possible with Azure, Google Cloud and other cloud provider virtual machines. Support for Windows-based VMs is being tracked [here](https://github.com/pulumi/pulumi-command/issues/15).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does CopyFile still work? If not, do we have issues tracking getting content and examples updated to support the new names and arguments? Do we need a short migration guide like we did with AWS?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, looks like the affected examples will be captured in pulumi/examples#1654.

Filed this for the content stuff: pulumi/docs#12166

Feel free to add anything else to that list that seems relevant. (Just want to make sure we cover any breaking changes beyond CopyFile.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CopyFile still works, it just has a deprecation notice. This is also explained in the blog post. So IMO we don't need anything else here.

Copy link

Your site preview for commit 3c43bb2 is ready! 🎉

http://registry--origin-pr-4833-3c43bb20.s3-website.us-west-2.amazonaws.com/registry.

Copy link

github-actions bot commented Jul 1, 2024

Your site preview for commit 33dd4f4 is ready! 🎉

http://registry--origin-pr-4833-33dd4f49.s3-website.us-west-2.amazonaws.com/registry.

Copy link

github-actions bot commented Jul 1, 2024

Your site preview for commit 8a09f22 is ready! 🎉

http://registry--origin-pr-4833-8a09f228.s3-website.us-west-2.amazonaws.com/registry.

@thomas11
Copy link
Contributor Author

thomas11 commented Jul 1, 2024

Hey @thomas11, I noticed the chooser was kind of broken and the JS examples didn't quite work, so I took the liberty of pushing a commit to save you the hassle of fixing these things up. Hope that's ok!

Thank you, I appreciate it!

Regarding the EC2/copy example: it spends about ~22 lines on provisioning an EC2 instance with pulumi-aws, with no usage of Command. I think it might be good to remove that part.

I agree -- and what's worse it that the relevant parts aren't even visible in the snippet because it's being cropped. Definitely support swapping this out with something else, but will leave that to you.

I swapped it out. The actual copy and command are still the same.

How about the "Using local.Command with CURL to manage external REST API" example? Do you have code in the other languages for that one?

That's the only one remaining where I don't have code in other languages yet.

@thomas11 thomas11 merged commit 743b0bd into master Jul 1, 2024
3 checks passed
@thomas11 thomas11 deleted the tkappler/command-index branch July 1, 2024 15:17
Copy link

github-actions bot commented Jul 1, 2024

Site previews for this pull request have been removed. ✨

@mjeffryes mjeffryes added this to the 0.107 milestone Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants