It doesn't look like you receive PMs, but I'd love to talk with you about your improvements.
If you're up for a call, you can schedule time to talk at my Calendly link here.
The convo doesn't necessarily need to take 45 minutes -- I want to be considerate of your time. If you have any questions/concerns, let me know! We are fairly flexible and mainly excited to hear your candid thoughts.
​
Thanks again!
They will take a similar amount of time as normal Spacelift proposed runs.
They run in the cloud / on your private workers. The first thing the CLI does is upload the local directory to S3 (while respecting ignore files). The time this will take depends on the size of your files and throughput of your connection. I.e. in the case above there are just .tf files, so the upload is literally just a few kilobytes, which takes <1 second.
In order to get a feeling check out the asciinema link in the post, as it's realtime: https://asciinema.org/a/FMKQ0iANzSRmcKGeTaFb8coDX
I feel you should be solving this problem before you get to Terraform.
Maybe something like linking submodules
https://git-scm.com/book/en/v2/Git-Tools-Submodules
Or even a wrapper script that pulls all the repos down then runs the terraform.
I'm sorry but it's quite hard to see what you're doing with everything in line like that. For the user data I would recommend that you create a separate file. It will then be much easier to ensure it meets the cloud init specification. In this case I don't see a need for seperate part files and I don't see the correct opening lines.
terraform up and running book, very good introduction if you start from zero. v3 is released on 1. nov, you can get v2 if you don't want to wait
Here is one book on it to start with.
https://www.amazon.ca/Beginning-HCL-Programming-Automation-Configuration/dp/1484266331
Hi! Not sure if you want to chat further about Terraform, but if you're up for a call -- you can schedule time to talk at my Calendly link here.
Yes. It's completely possible.
You do the same thing for Terraform modules as you do for CI systems getting access to source code to build and run your tests for apps.
If you follow the steps for a Personal Access Token (PAT) here, you should be set: https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml
Note, that the PAT will need repo scope for all the repos with your modules. If you create a PAT for yourself with repo scope it should be enough.
You can also solve this generically for any system with a modern Git client using a Git Credential Helper:
https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage
You would need to run a command at the start of whatever pipeline tech you use to set up the credentials as that page describes. Then all further git operations should use your saved credentials to pull modules.
You seem to be using a hybrid of the SSH URL syntax and the SCP-like syntax when specifying a Git URL. Git supports both, but you need to choose one or the other because otherwise the result is ambiguous:
git::ssh://[email protected]/hashicorp/terraform//examples/cross-provider
git::[email protected]:hashicorp/terraform//examples/cross-provider
Notice that the URL-based form uses a slash to introduce the path, while the SCP-like syntax uses a colon. If you use a colon to introduce the path in the URL-like form then standard URL syntax suggests that :hashicorp
would specify a port number, not part of the path.
(The git::
prefix and //examples/cross-provider
suffix are handled by Terraform itself here, so the portion passed to Git itself is either ssh://[email protected]/hashicorp/terraform
or [email protected]:hashicorp/terraform
, depending on which form you choose.)
I'm trying this out and am trying to install it and getting this error. Any ideas? I know very little about go.
$ go build -v go: downloading github.com/golang/protobuf v1.2.0 go: downloading github.com/zclconf/go-cty v0.0.0-20181017232614-01c5aba823a6 go: downloading github.com/mitchellh/cli v1.0.0 go: downloading github.com/mitchellh/go-homedir v1.0.0 go: downloading github.com/pkg/errors v0.8.0 go: downloading github.com/hashicorp/go-multierror v1.0.0 go: downloading golang.org/x/crypto v0.0.0-20181126163421-e657309f52e7 go: downloading github.com/apparentlymart/go-cidr v1.0.0 go: downloading golang.org/x/net v0.0.0-20181114220301-adae6a3d119a Fetching https://golang.org/x/net?go-get=1 Fetching https://golang.org/x/crypto?go-get=1 go: downloading github.com/mattn/go-isatty v0.0.3 go: downloading github.com/ryanuber/columnize v2.1.0+incompatible go: downloading github.com/googleapis/gax-go v2.0.2+incompatible go: downloading github.com/mitchellh/go-wordwrap v1.0.0 go: downloading github.com/mitchellh/mapstructure v1.1.2 go: downloading github.com/Azure/azure-sdk-for-go v10.3.0-beta+incompatible go: downloading github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 go: downloading github.com/mitchellh/go-linereader v0.0.0-20141013185533-07bab5fdd958 go: verifying github.com/hashicorp/: checksum mismatch downloaded: h1:VBj0QYQ0u2MCJzBfeYXGexnAl17GsH1yidnoxCqqD9E= go.sum: h1:9HVkPxOpo+yO93Ah4yrO67d/qh0fbLLWbKqhYjyHq9A=
$ go version go version go1.11.5 linux/amd64
I've also tried with go1.12.2
Hello @packeteer. Thanks for the kudos :)
Here's a link to the slides of a Meetup talk I did that explains this structure
As what the other person said, changing your app to fetch this data would be the least kludgey.
However there might be a way to use the Downward API to set the pod name as an env var: https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/#the-downward-api
I haven’t a clue how pods/deployments are configured in Terraform but looks trivial in their yaml example.
The pod may crash and restart subject to the pod spec restartPolicy, if a dependent resource isn't available during deployment. If the resource becomes available during the CrashLoopBackOff window, then the pod will become ready at the next restart.
You can use kubectl describe -n <namespace> pod <podname> to get more info about the crash. If you want to post you TF config I can take a look at that too.
Based on your description, I think you're missing your Kubernetes services for interpod communication.
I don't quite agree with u/azjunglist05's assessment about provider maturity, but there are definite considerations when using the Kubernetes provider. For example, you'll probably want to use Deployments or Jobs rather than trying to manage Pods directly. There are other considerations in to docs as well. I'm also excited about the upcoming enhancements to the provider, which will alleviate many of the current considerations.
Helm with the Helm provider is also a good option, especially if you're already using Helm. You'll have to create a Chart for you app if you go that route. You can use Terraform to set Helm values, which mean you can insert the Azure Key Vault credentials.
For a simple app like you described, the Kubernetes provider is probably sufficient.
Side note: There's a pretty active community in #terraform-providers channel on the Kubernetes Slack.
Full disclosure: I'm the PM for the Kubernetes provider
GitLab 13 introduced the support for using GitLab as Terraform HTTP state backend which supports encryption at rest and locking, as well as reviewing plan outputs in merge requests (in a way similar to but not quite as Atlantis). This doc contains details about how to configure these new features, while their overview of can be found here: https://about.gitlab.com/releases/2020/05/22/gitlab-13-0-released/#gitlab-http-terraform-state-backend and https://about.gitlab.com/releases/2020/05/22/gitlab-13-0-released/#review-summary-of-terraform-plan-in-merge-requests
Well can you rebuild the base images, If so I would look at packer to build the images you need. VMware does allow snapshots of running vms, which means you can theoretically snapshot vms, make them into ami formats and import, this could be a lot of work depending on how many different unique machines you have.
Also here is a tool from aws https://aws.amazon.com/ec2/vm-import/
Thanks, man! I'll try, of course. My internet connection is fast and reliable. I have 300 Mbps download from Xfinity. My internet is not an issue in this case. But psi provides the worst proctor exam ever. Just check this link out:
I'd link the second (and updated!) version of that book :p https://www.amazon.com/Terraform-Running-Writing-Infrastructure-Code-dp-1492046906/dp/1492046906/ref=dp_ob_title_bk
As for a great Terraform resource: https://www.amazon.com/Terraform-Running-Writing-Infrastructure-Code/dp/1491977086
Just so everyone is aware, this is the 1st edition - it’s from 2017, so it’s quite out of date. The 2nd edition is slightly discounted right now according to amazon: https://www.amazon.com/dp/1492046906/ref=cm_sw_r_cp_api_i_UjDPDbY97J19H