October 2022 Summaries
9 posts from Spacelift
Filter
Month:
Year:
Post Summaries
Back to Blog
Azure DevOps is a unified platform from Microsoft that combines various developer services to facilitate planning work, collaborating on code development, and building and deploying applications. It can be used as a cloud Software-as-a-service (SaaS) offering or be hosted on an on-premise server. Azure DevOps supports popular extensions for Visual Studio Code and offers several advantages such as maintenance-free operations, access to cloud build and deployment servers, and tight RBAC permission model integrated with Azure AD. However, if data needs to stay within the organization's premises, users may need to opt for the server version of Azure DevOps, which comes with additional management and hosting overheads. Key features include Boards, Repos, Pipelines, Test Plans, Artifacts, Wiki, team dashboards, and notifications. Some popular extensions for Azure DevOps include Slack, Microsoft Teams, Replace Tokens, Azure DevOps Open in Excel, Code Search, Sonarqube, Terraform, Ansible, Chef, Kubernetes, and Bicep. Alternatives to Azure DevOps include GitHub, GitLab, and Bitbucket.
Oct 31, 2022
1,208 words in the original blog post.
This blog post presents a list of books to help advance your career in DevOps, Site Reliability Engineering, and Cloud Engineering & Architecture. The list includes free and paid books covering various topics such as technical, business, personal growth, and more. Some key books mentioned are "Accelerate," "The Phoenix Project," "Site Reliability Engineering," "Clean Architecture," "Designing Distributed Systems," and "Never Split the Difference." The author emphasizes that this list is not exhaustive but offers a collection of interesting books for professional growth.
Oct 28, 2022
2,766 words in the original blog post.
The article discusses the use of Terraform's depends_on meta-argument to create explicit dependencies between resources or modules when implicit dependencies cannot be inferred by Terraform. This is useful in scenarios where a resource relies on another resource's behavior but does not access any of that resource's data in its arguments. The article provides examples and use cases for depends_on, as well as considerations to keep in mind when using it. It also mentions Spacelift as a tool for managing Terraform infrastructure and workflows.
Oct 27, 2022
1,066 words in the original blog post.
Kubernetes Secrets are objects that store sensitive data such as login usernames and passwords, tokens, keys, etc., to reduce the risk of exposing sensitive data while deploying applications on Kubernetes. They can be created using kubectl, a manifest file, or a generator like Kustomize. There are several types of Secrets, including Opaque Secrets, Service account token Secrets, Docker config Secrets, Basic authentication Secret, SSH authentication secrets, TLS secrets, and Bootstrap token Secrets. Secrets can be used in Pods as container environment variables or files in a volume mounted on one or more of its containers. They can also be used by the kubelet when pulling images for the Pod. To ensure safety, it is recommended to enable encryption at rest for Secrets and set least-privilege access to Secrets as the default setting with RBAC rules.
Oct 25, 2022
2,675 words in the original blog post.
The article discusses the differences between kubectl apply and kubectl create commands in Kubernetes. Declarative management is where we specify the required outcome without detailing individual steps, while imperative management involves giving a series of instructions to reach a goal. kubectl apply is a declarative command that applies a configuration to a resource by file name or stdin and creates it if it doesn't exist. On the other hand, kubectl create is an imperative command that creates a resource from a file or from stdin but errors if the resource already exists. The article provides usage examples for both commands on an Azure Kubernetes Service cluster (AKS).
Oct 21, 2022
861 words in the original blog post.
YAML is a popular data serialization language known for its simplicity and human-readability. It is widely used in configuration files, data persistence, internet messaging, and cross-language data sharing. YAML stands for "YAML Ain't Markup Language" and works with all modern programming languages. The basic syntax of a YAML file includes three node types: maps/dictionaries, arrays/lists, and literals (strings, numbers, boolean, etc.). Comments can also be added using the '#' character.
Advanced YAML features include documents, schemas, tags, anchors, aliases, and overrides. Tags can be used to explicitly specify a type for values. Anchors (&) and aliases (*) help avoid duplication in large configurations by defining a chunk of configuration that can be referred to at different parts of the configuration.
YAML is a superset of JSON, meaning all JSON files are valid YAML files, but not vice versa. YAML is used in various tools such as Kubernetes and Ansible for automating deployment, scaling, and management of containerized applications.
Oct 18, 2022
3,197 words in the original blog post.
Terraform is an Infrastructure as Code tool that uses HCL to configure target infrastructure requirements and download plugins from the registry for calling respective cloud platform APIs. The state file stores crucial information about infrastructure components managed via Terraform, which is used by subsequent operations. The validate command validates the configuration internally i.e., locally on the host system without any dependency on state files or deployed resources. It focuses on validating the Terraform configuration files for syntax and internal consistencies.
Oct 10, 2022
1,754 words in the original blog post.
In Kubernetes (K8S), a pod is the smallest unit and should run until replaced by a new deployment. There is no direct way to restart a pod; instead, it should be replaced. Pods can have five possible statuses: Pending, Running, Succeeded, Failed, and Unknown. A pod may need to be 'restarted' in various situations, such as when the pod status is stuck in a 'terminating' state or when a pod is erroring and that error cannot be fixed without a restart.
To 'restart' a pod with kubectl, several methods can be used:
1. `kubectl rollout restart`: This method is the recommended first port of call as it will not introduce downtime as pods will be functioning. A rollout restart will kill one pod at a time and then new pods will be scaled up.
2. `kubectl scale`: This method will introduce an outage and is not recommended. If downtime is not an issue, this method can be used as it can be a quicker alternative to the kubectl rollout restart method.
3. `kubectl delete pod` or `kubectl delete replicaset`: Each pod can be deleted individually if required. However, where lots of pods are running this is not really a practical approach.
4. `kubectl get pod | kubectl replace`: The pod to be replaced can be retrieved using the kubectl get pod to get the YAML statement of the currently running pod and pass it to the kubectl replace command with the --force flag specified in order to achieve a restart.
5. `kubectl set env`: Setting or changing an environment variable associated with the pod will cause it to restart to take the change.
In general, the best approach is to use the kubectl rollout restart method as it will avoid application downtime. A restart will not resolve the problem that caused the pods to have issues in the first place, so further investigation will be required into the root cause.
Oct 06, 2022
1,018 words in the original blog post.
Infrastructure as Code (IaC) tools are essential in the cloud computing world, offering efficiency in resource management and deployment. One popular IaC tool is Hashicorp's Terraform. However, there are several alternatives to consider when choosing an IaC tool. These include Pulumi, AWS CloudFormation, Azure ARM Templates, Google Deployment Manager, AWS CDK, CDKTF, Microsoft Bicep, and Ansible. Each of these tools has its own unique features and capabilities, such as the programming languages used for writing IaC, how relationships between configurations and cloud resources are managed, whether they are cloud-agnostic or adherent, and their community support. By considering these factors, organizations can make an informed decision on which IaC tool best suits their needs.
Oct 04, 2022
2,864 words in the original blog post.