IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] 楽天カード改悪? 1%還元を「買い物ごと」に変更する理由 |
https://www.itmedia.co.jp/business/articles/2308/30/news089.html
|
運営会社 |
2023-08-30 06:45:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] セブン「チョコミントサンド」に反響 “チョコミン党”以外も開拓 |
https://www.itmedia.co.jp/business/articles/2308/30/news045.html
|
itmedia |
2023-08-30 06:30:00 |
TECH |
Techable(テッカブル) |
クラウドセキュリティ運用を効率化するSaaS「Shisho Cloud」正式版、AWSなどのセキュリティ診断を自動化 |
https://techable.jp/archives/218332
|
flattsecurity |
2023-08-29 21:00:43 |
AWS |
AWS Marketplace |
Using HiPaaS to convert your data to FHIR to use with AWS HealthLake |
https://aws.amazon.com/blogs/awsmarketplace/using-hipaas-convert-data-fhir-integrate-aws-healthlake/
|
Using HiPaaS to convert your data to FHIR to use with AWS HealthLakeIn this blog post Sandeep Malini Bakha and Aparna will show how to convert your healthcare data to FHIR format and load it into AWS HealthLake using HiPaaS FHIR data converter solution This solution enables you to access and manage the data from various sources without the need for manual data entry or reconciliation |
2023-08-29 21:55:22 |
AWS |
AWS Marketplace |
Speed product provisioning with customized SaaS landing page fields |
https://aws.amazon.com/blogs/awsmarketplace/speed-product-provisioning-customized-saas-landing-page-fields/
|
Speed product provisioning with customized SaaS landing page fieldsIn this blog post we show how to customize your landing page for the serverless SaaS integration by adding additional fields to the landing page You can also create input validations for the new variables added |
2023-08-29 21:39:34 |
AWS |
AWS Database Blog |
Monitor real-time Amazon RDS OS metrics with flexible granularity using Enhanced Monitoring |
https://aws.amazon.com/blogs/database/monitor-real-time-amazon-rds-os-metrics-with-flexible-granularity-using-enhanced-monitoring/
|
Monitor real time Amazon RDS OS metrics with flexible granularity using Enhanced MonitoringAmazon Relational Database Service Amazon RDS provides access to real time metrics for your operating system enabling you to monitor how different processes or threads use RDS resources You can manage the metrics you want to monitor for each instance on the Amazon RDS console Amazon CloudWatch is the native monitoring tool of AWS It is … |
2023-08-29 21:17:18 |
技術ブログ |
Developers.IO |
Google Cloud Next の 認定者ラウンジに行ってきました #GoogleCloudNext |
https://dev.classmethod.jp/articles/i-went-to-google-cloud-nexts-certified-persons-lounge/
|
cloud |
2023-08-29 21:35:19 |
海外TECH |
Ars Technica |
After Musk’s mass layoffs, X says it’s expanding safety and election teams |
https://arstechnica.com/?p=1964168
|
twitter |
2023-08-29 21:13:49 |
海外TECH |
MakeUseOf |
OysterVPN Review: Fast, Secure, and Budget-Friendly |
https://www.makeuseof.com/oystervpn-review-fast-secure-budget-friendly/
|
budget |
2023-08-29 21:30:24 |
海外TECH |
DEV Community |
Introduction to Rails API: How to Create Your First Endpoint in Less Than a Minute? |
https://dev.to/vladhilko/introduction-to-rails-api-how-to-create-your-first-endpoint-in-less-than-a-minute-4l66
|
Introduction to Rails API How to Create Your First Endpoint in Less Than a Minute OverviewThis is the first article in the Clean Rails API series In this piece we will provide a brief introduction to Rails API We ll discuss what it is how it looks its key components and share simple examples We ll also demonstrate how request specs can be added Furthermore we ll provide a direction for API evolution and highlight the problems that have to be solved in the future to provide a high quality solution IntroductionAPI Application Programming Interface is a set of rules and protocols that allow one application to interact with another application There are several API paradigms that fall into two main categories Request Response APIs and Event Driven APIs Request Response APIsREST API Representational State Transfer RPC Remote Procedure Call GraphQLEvent Driven APIsPollingWebHooksWebSocketsHTTP StreamingIn the context of this introduction to Rails API we will be working with REST API The name REST Representational State Transfer encapsulates the essence of this architectural style representing resources and their states and transferring data between clients and servers using HTTP ImplementationLet s review our plan for the Rails API introduction We ll begin with the Primitive Implementation Following that we will add several CRUD Endpoints and cover them using RSpec Request Tests Finally we will highlight areas for Improvements that we ll consider in the next article of this series Primitive ImplementationAt this part we re going to add a very simple endpoint just to demonstrate how the API may look We ll add this endpoint to the existing Rails application but if you want to start from scratch just create a new app with the rails new api sample api command We will start by providing the Desired Interface then we will add the Implementation and after that check that everything works as expected Desired InterfaceFirst of all let s decide how our interface should look like and what data we expect to receive Let s assume that we want to send a GET request to http localhost api hello world and expect to receive the following response Status OK data Hello World ImplementationTo add such an API endpoint we have to follow two simple steps Create a new controller and method that will return data Hello World in JSON format Add a new route to bind our HTTP request to the created controller method To implement the first step we will add a new HelloWorldController with a hello world method inside app controllers api hello world controller rb frozen string literal truemodule Api class HelloWorldController lt ApplicationController def hello world render json data Hello World end endendTo implement the second step we will add get api hello world to config routes rb which will bind the HTTP request and the controller method config routes rb frozen string literal trueRails application routes draw do get api hello world action hello world controller api hello world end Verify FunctionalityAfter completing our implementation we can run the server and check its functionality rails sWhen you open your browser and visit http localhost api hello world you should see the following Status OK data Hello World That s it The simplest API has been added In the next chapter we will try to add more HTTP requests to cover CRUD actions Adding CRUD EndpointsIn this chapter we are going to add new API endpoints for CRUD HTTP requests We ll strive to keep everything as simple as possible focusing solely on the core components We will begin by defining the Desired Interface then proceed with the Implementation and finally we ll verify that everything works as expected and cover all endpoints with Request Specs Desired InterfaceWe ve demonstrated how to create the simplest API in the Hello World example Let s go further and create more endpoints with different HTTP methods I d like to have the following endpoints and expect them to return the following data GET http localhost api countries Status OK id name Spain POST http localhost api countries Status Created id name Spain PUT http localhost api countries Status No ContentDELETE http localhost api countries Status No Content ImplementationTo add these endpoints we will need to follow the same steps as in the previous part plus one improvement Let s start with the improvement In our enhancement we want to create a new wrapper class that we will use as the parent class for all our API controllers This new class will look like this app controllers api application controller rb frozen string literal truemodule Api class ApplicationController lt ActionController API endendThen instead of inheriting from the ApplicationController class we ll have all API controllers inherit from Api ApplicationController This change will provide us with more flexibility and reduce the risk of breaking non API controllers if we have any app controllers api hello world controller rb frozen string literal truemodule Api class HelloWorldController lt Api ApplicationController def hello world render json data Hello World end endendNow let s create a new controller with methods to handle all the requests mentioned above app controllers api countries controller rb frozen string literal truemodule Api class CountriesController lt Api ApplicationController def index render json id name Spain end def create render json id name Spain status created end def update head no content end def destroy head no content end endendAnd update the routes rb file to bind HTTP requests and controller methods frozen string literal trueRails application routes draw do get api countries action index controller api countries post api countries action create controller api countries put api countries action update controller api countries delete api countries action destroy controller api countries end Verify FunctionalityAfter everything has been implemented let s check if it works GET http localhost api countries Status OK id name Spain The first one works as expected and we know how to check it in the browser but what about the others How can we send different HTTP requests To solve this problem we re going to use Postman Postman is like an extended browser version that can send any HTTP request based on your instructions Postman looks like this Let s check our other HTTP requests POST http localhost api countries Status Created id name Spain PUT http localhost api countries Status No ContentDELETE http localhost api countries Status No ContentAs you can see everything works as expected Adding Request TestsAfter all requests have been added we need to cover them using request specs to ensure that everything will work as expected in the future as well To add specs we will use the rspec rails gem Our plan is to cover the HTTP request methods that have been added above GET http localhost api countries spec requests countries list spec rb frozen string literal truerequire rails helper RSpec describe Listing Countries do subject send request get request uri let request uri api countries it lists all countries do send request expect response to have http status successful expect JSON parse response body to eq id gt name gt Spain endendPOST http localhost api countries spec requests countries create spec rb frozen string literal truerequire rails helper RSpec describe Creating Countries do subject send request post request uri let request uri api countries it creates a country and returns it do send request expect response to have http status created expect JSON parse response body to eq id gt name gt Spain endendPUT http localhost api countries spec requests countries update spec rb frozen string literal truerequire rails helper RSpec describe Updating Countries do subject send request put request uri let request uri api countries it updates the country and returns nothing do send request expect response to have http status no content expect response body to be empty endendDELETE http localhost api countries spec requests countries destroy spec rb frozen string literal truerequire rails helper RSpec describe Destroying Countries do subject send request delete request uri let request uri api countries it deletes the country and returns nothing do send request expect response to have http status no content expect response body to be empty endendThat s it You can run rspec spec requests to ensure that they work ImprovementsWe have demonstrated the simplest examples but there s room for many improvements I would consider at least the following points Update RoutingAdd Representers SerializersAdd logic to Create Update Delete resourcesAdd Error HandlingAdd Request Tests RSwag DocumentationApply Authorization Authentication rulesSupport URL queries limits pagination filtering Set up Middleware Rate Limits CORS etc Add API Versioning ConclusionTo sum it up this article is the beginning of our Clean Rails API series We ve talked about what Rails API is shown some examples and explained how to test it In the future we will improve our solution by addressing each improvement point one by one |
2023-08-29 21:53:19 |
海外TECH |
DEV Community |
Unlocking Web Accessibility with Semantic HTML Elements; Beyond Design and Presentation |
https://dev.to/vayolapradeep/unlocking-web-accessibility-with-semantic-html-elements-beyond-design-and-presentation-5ahg
|
Unlocking Web Accessibility with Semantic HTML Elements Beyond Design and Presentation Exploring the Importance of Semantic and Non Semantic HTMLSemantic HTML and non semantic HTML refer to the way HTML elements are used to structure and present content on a webpage semantic HTML is focused on using elements that accurately describe the content s meaning and structure enhancing accessibility and maintainability Non semantic HTML is more concerned with layout and presentation potentially leading to less accessible and harder to maintain code Semantic HTML focuses on using elements that provide inherent meaning and context to content enhancing accessibility search ability and overall structure Non semantic HTML is often used for layout and presentation purposes without conveying specific meaning potentially affecting accessibility search engine optimization and code maintainability It s generally recommended to prioritize the use of semantic HTML for creating well structured and accessible web content What is Non Semantic HTMLNon semantic HTML on the other hand involves using HTML elements purely for layout or presentation purposes without considering the underlying meaning of the content Non semantic HTML often relies on generic elements like lt div gt and lt span gt to create structure and apply styles but these elements don t convey any inherent meaning about the content they enclose While non semantic HTML can be useful for styling and layout it can lead to less accessible and less maintainable code Without proper structure and semantic meaning it becomes harder for assistive technologies and search engines to interpret the content accurately What is Semantic HTMLSemantic HTML involves using HTML elements in a way that accurately reflects the meaning and structure of the content they enclose Semantic elements have inherent meaning and convey information about the content they contain This approach makes the content more accessible and understandable for both humans and machines such as search engines and screen readers Examples of semantic HTML elements include lt header gt lt nav gt lt main gt lt article gt lt section gt lt aside gt lt footer gt lt figure gt lt figcaption gt lt time gt lt mark gt lt blockquote gt lt q gt lt cite gt and others These elements help define the structure and purpose of different parts of a webpage making it easier to style navigate and interpret the content Why is Semantic HTML is important Semantic HTML is crucial for several reasons all of which contribute to creating accessible well structured and easily maintainable web content Here are some key reasons why using semantic HTML is important Accessibility Semantic HTML helps make your content more accessible to people with disabilities Screen readers and other assistive technologies rely on the semantic meaning of HTML elements to provide accurate information to users with visual impairments Properly structured semantic elements allow screen readers to navigate and convey the content effectively Search Engine Optimization SEO Search engines use the semantic structure of your HTML to understand the content and context of your web pages By using semantic elements like lt header gt lt nav gt lt article gt and others you provide clear signals to search engines about the significance of different sections of your content potentially improving your search engine rankings Structured Content Semantic HTML provides a clear structure to your content making it easier for both humans and machines to understand the relationships between different parts of your webpage This structure enhances readability and comprehension for users leading to a better user experience Future Compatibility As the web continues to evolve new devices and technologies will emerge Semantic HTML creates a strong foundation that is more likely to remain compatible with future technologies and platforms ensuring that your content remains relevant and accessible Maintainability Using semantic HTML makes your codebase more organized and easier to maintain Semantic elements provide a natural structure that is self explanatory and helps developers quickly understand the purpose of different sections of the codebase Consistency Semantic HTML encourages a consistent approach to structuring content across your website This consistency helps users become familiar with your site s layout and navigation improving their overall experience Styling and Theming Semantic HTML provides a solid structure for applying CSS styles and themes When your content is structured using semantic elements you can apply styles more efficiently and avoid relying on complex class names and selectors Collaboration When developers and designers use semantic HTML it becomes easier for team members to collaborate The clear structure and meaning of elements facilitate communication and understanding between different roles in a project Mobile and Responsive Design Semantic HTML is essential for creating responsive and mobile friendly designs The structured content allows for more straightforward adaptation to different screen sizes and devices Here s a comprehensive list of semantic HTML elements along with their brief explanations lt header gt Represents the introductory content or the top section of a document often containing a site title logo and main navigation lt nav gt Defines a navigation section containing navigation links such as menus for easy navigation within a website lt main gt Contains the primary content of a document excluding headers footers and sidebars There should be only one element per page lt article gt Encloses self contained content that could be distributed independently such as blog posts news articles or forum posts lt section gt Divides content into thematic sections providing a way to structure and organize the content lt aside gt Contains content that is tangentially related to the main content like sidebars pull quotes or advertisements lt footer gt Represents the closing content of a section or the bottom of a page often containing copyright information contact details and related links lt figure gt Wraps multimedia content like images videos diagrams or code snippets typically with a descriptive caption using lt figcaption gt lt figcaption gt Provides a caption or description for content within a lt figure gt element lt time gt Represents a specific date time or time range in a machine readable format Can include a datetime attribute for more accurate interpretation lt details gt Creates an interactive disclosure widget that allows users to toggle open or close to reveal additional information lt summary gt Provides a visible label or title for the disclosed content within a lt details gt element lt mark gt Highlights text to indicate relevance or a specific portion of content lt blockquote gt Indicates a section of quoted text from another source often used to attribute quotes lt q gt Defines a short inline quotation within a paragraph Can be used for shorter quotes than lt blockquote gt lt cite gt Represents the title or name of a work being cited like a book or article often used within lt blockquote gt or lt q gt lt abbr gt Defines an abbreviation or acronym and can include a title attribute to provide the expanded version lt address gt Contains contact information for the author or owner of a document typically found in a footer lt strong gt Marks text with strong importance indicating stronger emphasis than regular text lt em gt Emphasizes text often by adding emphasis or stress to its meaning lt mark gt Highlights text for reference or emphasis often with a distinctive background color lt code gt Represents a snippet of computer code typically used within a paragraph to distinguish code from regular text lt kbd gt Represents keyboard input used to display text that the user should type lt samp gt Represents sample output from a computer program often used for displaying code output lt var gt Represents a variable such as in mathematics or programming lt dfn gt Represents the defining instance of a term used to indicate a term s definition lt pre gt Defines preformatted text typically used for displaying code or text with whitespace formatting preserved lt data gt Embeds machine readable data within the content often used for marking up values lt meter gt Represents a scalar measurement within a known range such as a progress bar or gauge lt progress gt Displays an indicator showing the completion progress of a task Difference between semantic and non semantic htmlThe primary difference between semantic and non semantic HTML lies in how they are used to structure and present content on a webpage Let s explore these differences in more detail Meaning and Purpose Semantic HTML Semantic HTML elements have intrinsic meaning and convey the purpose or role of the content they enclose They provide contextual information about the content s meaning and help define its structure within the document Semantic elements are designed to enhance the accessibility searchability and understanding of the content Examples include lt header gt lt nav gt lt article gt and lt footer gt Non semantic HTML Non semantic HTML elements are often used purely for layout and presentation purposes They don t convey any specific meaning or context about the content they contain These elements are typically used to structure the layout of the page or apply styles without providing any inherent semantic value Examples include lt div gt and lt span gt Accessibility Semantic HTML Semantic elements play a crucial role in making content accessible to people with disabilities particularly those who use screen readers The semantic meaning of these elements helps screen readers understand the structure and context of the content enabling a better browsing experience for users with visual impairments Non semantic HTML While non semantic elements can still be made accessible through additional attributes and techniques they lack the inherent semantic value that makes content easier to understand and navigate for assistive technologies Search Engine Optimization SEO Semantic HTML Search engines use the semantic structure of HTML to understand the content and context of a webpage Semantic elements help search engines identify the importance of different sections of content potentially leading to improved search engine rankings Non semantic HTML Non semantic elements don t provide clear signals to search engines about the significance of content sections potentially affecting SEO efforts Content Structure Semantic HTML Semantic elements provide a clear structure to the content making it easier for both humans and machines to understand the relationships between different parts of the webpage Non semantic HTML Non semantic elements may create a more arbitrary or inconsistent content structure which can hinder comprehension and maintenance Maintainability Semantic HTML Semantic elements contribute to better code organization and maintainability Developers can quickly understand the purpose of different sections of the codebase which aids collaboration and updates Non semantic HTML Non semantic elements might result in a less organized codebase making it harder to maintain and modify the code Similarity of semantic and non semantic htmlWhile semantic and non semantic HTML have distinct differences in their usage and purposes there are some similarities between the two as well Both are HTML Elements Both semantic and non semantic HTML elements are part of the HTML language They are used to structure and present content on webpages Both Can Be Styled Both semantic and non semantic elements can be styled using CSS to control their appearance layout and presentation on the webpage Both Are Rendered by Browsers Browsers render both semantic and non semantic elements to display content to users However the way they interpret and present the content can vary based on the role and meaning of the elements Both Can Be Nested Both types of elements can be nested within each other to create more complex content structures Both Contribute to the Webpage Both semantic and non semantic elements play a role in constructing webpages although they have different effects on accessibility structure and search engine optimization Both Can Be Enhanced with Attributes Both types of elements can be enhanced with additional attributes to provide more information or functionality For example you can use class and id attributes on both semantic and non semantic elements for styling and JavaScript interactions Both Can Be Misused Both semantic and non semantic elements can be misused if not applied appropriately Overusing semantic elements or using non semantic elements to convey meaning can lead to confusion or poor practices Both Can Impact Performance Both types of elements can impact webpage performance especially if used excessively or inefficiently Proper optimization is important regardless of the type of elements being used |
2023-08-29 21:38:25 |
海外TECH |
DEV Community |
One staging for each engineer: introducing Layerform |
https://dev.to/lucasfcosta/one-staging-for-each-engineer-introducing-layerform-5bc5
|
One staging for each engineer introducing LayerformLayerform allows developers to spin up multiple instances of their applications while reusing core parts of their infrastructure That way companies can give each engineer their own staging environment Consequently engineers can avoid bugs from getting into production and more easily show their work to others Assume you re running multiple pods in a Kubernetes cluster for example In that case you can use Layerform so that each developer has their own pods and namespaces on top of a shared Kubernetes cluster In this post I ll explain how Layerform allows engineers to do that by manipulating Terraform state First I ll explain how Terraform states work and the problems with how they re currently implemented Then I ll explain how you could manipulate states to create resource replicas and reuse infrastructure Finally I ll show how Layerform itself uses similar state management techniques to enable development platforms that allow for resources to be reused What is a Terraform state Every Terraform setup has two parts tf files describing the ideal state and tfstate files describing the current state Whenever you call terraform apply it will compare the desired state described in your tf files with the current state in your tfstate files Then it will apply the differences Assume you want to create an S bucket in your AWS account For that you ll declare the desired state in your main tf file main tfprovider aws region us east resource aws s bucket my bucket bucket my unique bucket name layerform tags Name foo Then when running terraform apply Terraform will invoke the AWS provider which uses the AWS CLI to talk to AWS and create your bucket After creating your bucket Terraform will store information about the new bucket in a terraform tfstate file That file contains the actual state of your infrastructure version terraform version serial lineage ca outputs resources mode managed type aws s bucket name my bucket provider provider registry terraform io hashicorp aws instances schema version attributes arn arn aws s my unique bucket name layerform bucket my unique bucket name layerform tags Name foo tags all Name foo check results null The next time you change your main tf file Terraform will compare the desired state in main tf with the actual state in terraform tfstate to determine which changes it must apply Let s say you change your bucket s tags and run terraform apply for example main tf resource aws s bucket my bucket bucket my unique bucket name layerform tags Name Look I changed something When you do that Terraform will compare the new desired state with the actual state in terraform tfstate Then it will see that the tags and tags all properties are different and tell you it plans to update these fields Terraform used the selected providers to generate the following execution plan Resource actions are indicated with the following symbols update in placeTerraform will perform the following actions aws s bucket my bucket will be updated in place resource aws s bucket my bucket id my unique bucket name layerform tags Name foo gt Look I changed something tags all Name foo gt Look I changed something unchanged attributes hidden unchanged blocks hidden After confirming the apply the terraform tfstate file will now contain the updated tags version terraform version resources mode managed type aws s bucket name my bucket provider provider registry terraform io hashicorp aws instances schema version attributes tags Name Look I changed something tags all Name Look I changed something check results null Note that tfstate files are the only way for Terraform to know which resources exist If you delete your tfstate file and run terraform apply Terraform will try to create your bucket again If you proceed with the apply it will throw an error because the bucket already exists Error creating Amazon S Simple Storage Bucket my unique bucket name layerform bucket already exists with aws s bucket my bucket on main tf line in resource aws s bucket my bucket resource aws s bucket my bucket Manipulating state to create multiple bucketsLet s say a developer called Aaron wants to have his own bucket for testing purposes For that Aaron needs to duplicate the aws s bucket resource and run terraform apply again main tf resource aws s bucket my bucket bucket my unique bucket name layerform resource aws s bucket aarons bucket bucket aarons unique bucket layerform The problem with this approach is that developers must duplicate resources to get their own instances of resources This problem compounds as you add resources that depend on one another For example if these S buckets must contain an object Aaron needs to duplicate the aws s bucket and the aws s object within main tfresource aws s bucket my bucket bucket my unique bucket name layerform resource aws s object my configs bucket my unique bucket name layerform key configs keep content some configs resource aws s bucket my bucket bucket aarons unique bucket layerform resource aws s object my configs bucket aarons unique bucket layerform key configs keep content some configs As you can see duplication quickly becomes unmanageable and error prone Even if you use modules there s only so much you can do until you re duplicating the module declarations themselves You could also try using the count and for each meta arguments but there s only so much you can do until complexity hits you in the head And let s be honest if something is called a meta argument it s probably not a good idea To avoid duplication Aaron could tell Terraform to use his own empty tfstate file when running terraform apply terraform apply state aaron tfstate The problem with just using a new tfstate file is that it will cause Terraform to throw an error because there s already a bucket whose name is my unique bucket name layerform To avoid conflicts Aaron should create a random id resource and use its random ID in the bucket s name main tf resource random string prefix length upper false special false resource aws s bucket my bucket bucket random string prefix id layerform example Now Aaron and his team can create as many buckets as they want by specifying a different tfstate file every time That way everyone on the team can have their own buckets for testing and development purposes terraform apply state aaron tfstate terraform apply state dalton tfstate terraform apply state pete tfstate terraform apply state nicolas tfstateThis approach will work because each tfstate file will be empty causing Terraform to generate a new ID every time Consequently each bucket will have a different name and there won t be conflicts Besides the practical advantages of not having to modify tf files every time someone needs a new bucket this approach also completely detaches the concept of a desired state with the concept of an actual state In Terraform s design a declaration of the desired infrastructure is tied to a single actual state That s a bad abstraction In the real world various instances of the desired infrastructure may exist Consequently having various actual states should be possible too ーone for each infrastructure instance Baking reusability into state filesBuckets are cheap Consequently it s okay for each person on Aaron s team to have their buckets Now let s imagine Aaron s system ran on top of a Kubernetes cluster At the time of this writing a managed Kubernetes cluster on AWS costs which amounts to a month If Aaron Dalton Pete and Nicolas all use brand new EKS clusters for their testing and development environments that will cost their company a month and all clusters will be subutilized especially if they re provisioning large EC instances To save money Aaron could share the Kubernetes cluster with his team and allow each colleague to deploy their testing pods to a new namespace That way they d have a single cluster and pay only Additionally all pods could share the same EC instance making it even cheaper to run these development environments For that Aaron s first step would be to create an eks tf file and declare an EKS cluster Amazon s managed Kubernetes offering eks tfmodule eks shared cluster source terraform aws modules eks aws cluster name dev eks base layerform I have intentionally skipped the VPC and node groups configurations to keep these examples short and sweet When Aaron applies this file using terraform apply state base tfstate Terraform will generate a base tfstate file containing the cluster s data After that Aaron will create a pods tf file which declares a namespace and pods within that namespace To avoid conflicts Aaron will use random id to generate the namespace s name pods tfresource random string namespace suffix length special false resource kubernetes namespace user ns metadata name user ns namespace suffix resource kubernetes pod service a metadata name service a namespace kubernetes namespace user ns metadata name resource kubernetes pod service b metadata name service b namespace kubernetes namespace user ns metadata name Then Aaron can take a snapshot of the old base tfstate by copying it to base snapshot tfstate Then he can create his development pods using terraform apply state base tfstate That way Terraform will create his pods on top of the existing Kubernetes cluster without modifying base snapshot tfstate Now let s say Dalton also needs his own development pods but doesn t want to spend another and an extra minutes to create a new cluster for himself For that Dalton could ask Aaron for the base snapshot tfstate file Then he d run terraform apply state base snapshot tfstate to create his own set of pods within a new namespace in the same cluster Pete and Nicolas could do the same All they need to create their development pods in the same cluster is to ask Aaron for the base snapshot tfstate and use it when running terraform apply The problem with sharing state snapshotsThe problem with sharing state snapshots is that they must be kept up to date across all machines What happens if Nicolas wants to change the cluster s name and write it in French for example In that case he d have to apply the change and send the new tfstate file to Aaron Dalton and Pete to download Otherwise their terraform apply runs would start failing Also managing these files would become increasingly complicated if they share a kafka instance within the cluster In that case everyone in Aaron s team would have to have a base snapshot tfstate and a kafka snapshot tfstate that they need to merge into a single file before running terraform apply Layerform solves that problem by encapsulating your Terraform files into what we call layer definitions In Aaron s case if he were to use Layerform he d create one layer definition referencing his eks tf file and another referencing pods tf These would be the eks and the pods layers respectively For the pods layer definition Aaron would say it depends on an instance of the eks layer Then when running layerform spawn eks Layerform would run the eks tf file and associate the resulting tfstate to the ID default After that if Pete runs layerform spawn pods Layerform will pull the state for the default instance of eks Then it will merge the eks tf and pods tf files and apply them using that base state Dalton and Nicolas could do the same When they run layerform spawn pods Layerform will look for the default state for eks and spin their layer instances on top of it Storing state snapshotsSimilarly to Terraform Layerform can use a cloud back end to store the states for the different instances and associate them with their IDs The difference between Layerform and Terraform is that Layerform can pick and merge the different states based on their IDs Other things you can do with layersBy breaking down your infrastructure into layers you can have each team care for a particular part of the infrastructure For example the platform team could put together the configurations for a Kubernetes cluster and Kafka instance The other teams could then build their layers on top of the platform team s That way each team takes care of its own infra and may spin up multiple instances of it without relying on numerous matching strings coming from Terraform s data sources Besides encapsulation layers are also helpful for cost control and chargebacks By breaking down your infrastructure into layers Layerform can automatically tag resources in each layer instance so you know which teams layers spend the most Summarising layersAt the end of the day we can summarise Layerform as an intelligent way to break down desired states and dissociate them from actual states That way multiple actual states can exist for a particular desired state definition In a way layers and their instances are like classes and objects The terraform files for each layer are a class and each instance is an object with that class properties Questions If you ve got questions feel free to use this repository s issue tracker or book a few minutes with me If this post has been helpful please consider starring the repo or sharing it on HackerNews and Reddit |
2023-08-29 21:10:27 |
Apple |
AppleInsider - Frontpage News |
Sixth public betas for iOS 17 and others now available |
https://appleinsider.com/articles/23/08/29/sixth-public-betas-for-ios-17-and-others-now-available?utm_medium=rss
|
Sixth public betas for iOS and others now availableApple has released the sixth public betas for iOS iPadOS tvOS and watchOS iOS public beta Apple s upcoming operating systems are set to bring a host of new features that will enhance the user experience across various apps People who are interested in downloading the latest operating systems can do so via the Apple Beta Software Program Read more |
2023-08-29 21:31:53 |
海外TECH |
Engadget |
Meta's avatars finally grow some legs |
https://www.engadget.com/metas-avatars-finally-grow-some-legs-211016742.html?src=rss
|
Meta x s avatars finally grow some legsIt s been nearly a year since Meta announced at Connect that it would give its weird Caspar the Friendly Ghost esque metaverse avatars some legs to make them appear slightly more human The day of reckoning is almost upon us as Quest Home avatars now sport extra limbs in the latest beta version of the Quest software You won t see legs on your avatar when you look down as UploadVR points out They ll only be visible in third person or when you re looking at a virtual mirror much like in many first person shooter games This makes sense as there s no leg tracking option on any current consumer virtual reality system It means Meta doesn t have to worry too much about having accurate leg animations instead of I don t know wacky QWOP style physics In addition it seems your avatar s legs won t crouch in third person view when you bend your knees or sit down That could make things a little awkward when you re trying to maintain eye contact as much as that s possible in VR spaces with another user Meta Quest v PTC finally adds legs to your Meta avatar D pic twitter com dzuupppeーLuna Lunayian August The legs are not in the VR version of Horizon Worlds as yet though you should see them in the mobile and web versions if you re one of the folks testing those Curiously Meta said last year that quot legs will roll out to Worlds first quot before making their way to other avatar friendly experiences UploadVR also notes that Meta hasn t publicly updated its software development kit for avatars so external developers using that toolset can t play around with legs in the company s virtual spaces yet either This could all come to a head next month when this year s Meta Connect takes place Perhaps the company will have more to say about its virtual legs then One thing we know for sure about the event is that Meta will reveal much more about the Quest This article originally appeared on Engadget at |
2023-08-29 21:10:16 |
海外科学 |
NYT > Science |
She Was Depressed and Forgetful. It Was the Worm in Her Brain. |
https://www.nytimes.com/2023/08/29/science/live-brain-worm-australia.html
|
She Was Depressed and Forgetful It Was the Worm in Her Brain Doctors in Australia found a three inch live parasitic worm in a woman s brain during surgery after they spent more than a year trying to find the cause of her distress |
2023-08-29 21:43:33 |
海外科学 |
NYT > Science |
Karol Bobko, First to Pilot the Challenger Into Space, Dies at 85 |
https://www.nytimes.com/2023/08/24/us/karol-bobko-dead.html
|
Karol Bobko First to Pilot the Challenger Into Space Dies at Almost three years before it exploded he was aboard the shuttle on its maiden flight He commanded two other shuttle missions and was the first New York City native to orbit the earth |
2023-08-29 21:48:54 |
ニュース |
BBC News - Home |
Fulham 1-1 (5-3 on pens) Tottenham Hotspur: Richarlison scores but hosts win shootout |
https://www.bbc.co.uk/sport/football/66577560?at_medium=RSS&at_campaign=KARANGA
|
Fulham on pens Tottenham Hotspur Richarlison scores but hosts win shootoutRicharlison scores but cannot prevent Tottenham going out of the EFL Cup as Fulham win a penalty shootout to progress to round three |
2023-08-29 21:08:27 |
ニュース |
BBC News - Home |
Carabao Cup: Salford City 1-1 Leeds United (9-8 pens): League Two side stun Whites in epic penalty shootout |
https://www.bbc.co.uk/sport/football/66577676?at_medium=RSS&at_campaign=KARANGA
|
Carabao Cup Salford City Leeds United pens League Two side stun Whites in epic penalty shootoutLeague Two Salford stun Championship side Leeds with an epic penalty shootout victory in the Carabao Cup |
2023-08-29 21:44:38 |
ニュース |
BBC News - Home |
US Open 2023 results: Andy Murray, Katie Boulter & Cameron Norrie through |
https://www.bbc.co.uk/sport/tennis/66652365?at_medium=RSS&at_campaign=KARANGA
|
US Open results Andy Murray Katie Boulter amp Cameron Norrie throughAndy Murray joins Katie Boulter and Cameron Norrie in winning US Open first round matches on a productive day for the British players |
2023-08-29 21:39:54 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「免許返納」で親子関係がギクシャク…高齢ドライバーを説得する6つの方法 - News&Analysis |
https://diamond.jp/articles/-/328216
|
「免許返納」で親子関係がギクシャク…高齢ドライバーを説得するつの方法NewsampampAnalysis年に池袋で当時歳のドライバーが起こした事故など、高齢者ドライバーによる交通事故に関する関心は高い。 |
2023-08-30 07:00:00 |
コメント
コメントを投稿