Kubernetes Cluster Sizing – How Large Should a Kubernetes Cluster Be?
platform9.com – Learn the general guidelines for Kubernetes cluster sizing
Quelle: news.kubernauts.io
platform9.com – Learn the general guidelines for Kubernetes cluster sizing
Quelle: news.kubernauts.io
kube.academy – The Cluster API is a Kubernetes project to bring declarative, Kubernetes-style APIs to cluster creation, configuration, and management. This tooling can be leveraged to manage your Kubernetes estate …
Quelle: news.kubernauts.io
bookstack.cn – Creating a cluster with Ansible PlaybookDownload k0s-ansibleCreate virtual machinesCreate Ansible inventoryTest the connection to the virtual machinesProvision the cluster with AnsibleUse the cluster
Quelle: news.kubernauts.io
tanzu.vmware.com – In this Cloud & Culture podcast episode, VMware’s Sean Keery explains how and why to get started with chaos engineering, and how tools like Kubernetes and practices like SRE can help.
Quelle: news.kubernauts.io
itnext.io – It’s a simple container which tries to make a curl call to an imaginary api, also passing a secret token. Every RUN line creates a new image layer. If update and install are in different lines it…
Quelle: news.kubernauts.io
Docker Captains are select members of the community that are both experts in their field and are passionate about sharing their Docker knowledge with others. “Docker Captains Take 5” is a regular blog series where we get a closer look at our Captains and ask them the same broad set of questions ranging from what their best Docker tip is to whether they prefer cats or dogs (personally, we like whales and turtles over here). Today, we’re interviewing Nick Janetakis who has been a Docker Captain since 2016. He is a freelance full stack developer / teacher and is based in New York, United States.
How/when did you first discover Docker?
I was doing freelance web development work and kept running into situations where it was painful to set up my development environment for web apps created with Ruby on Rails. Different apps had different Ruby version requirements as well as needing different PostgreSQL and Redis versions too.
I remember running a manually provisioned Linux VM on my Windows dev box and did most of my development there. I even started to use LXC directly within that Linux VM.
That wasn’t too bad after investing a lot of time to automate things but then it was always a song and dance to get everything running on my client’s machines as well as production.
In 2014 I first discovered Docker. I think it was around version 1.4 at the time. I remember reading about Docker and deciding it was stable enough to give it a shot and I’ve been using it ever since.
What is your favorite Docker command?
It’s for sure docker-compose up. It’s by far my most used command.
There’s what drew me into using Docker in the first place. It’s the promise that all I have to do is run 1 or 2 commands and my whole tech stack will be up and running on all major platforms.
Sure back in 2014 it was called fig up and perhaps in the future docker-compose up will be replaced by a native docker command, but the same concept has applied for all these years.
What is your top tip you think other people don’t know for working with Docker?
You can use the same docker-compose.yml file in development and production and still have the flexibility to run different containers in each environment by using a docker-compose.override.yml file and then ignoring it from version control.
This comes in very handy for running a local copy of PostgreSQL or a Webpack dev server in development but then in production use a managed PostgreSQL database from your cloud provider while serving your pre-compiled assets from nginx or a CDN.
I made a video about this a while back on my blog. Speaking of which, there’s 100+ assorted Docker related posts and videos on my site. I tend to post everything I’ve learned there.
What’s the coolest Docker demo you have done/seen?
The very first time I ran a docker-compose up to bring up a web server, background worker, PostgreSQL and Redis in about 5 seconds I knew things were going to be good.
This wasn’t part of a specific presentation or recorded demo. It was demonstrating to myself that Docker has legs and wasn’t just the next hyped up technology that’s going to fizzle out in 6 months.
I’m usually not interested in watching toy demos or seeing one sliver of something applied in a non-real world use case to make it look appealing. I’m all about practical examples that help me in my day-to-day. That’s why I think something as basic as seeing a fully Dockerized / production-ready web app being started up with docker-compose up is cool.
What have you worked on in the past 6 months that you’re particularly proud of?
Helping some of my freelance clients deploy their web applications in production-ready ways. It’s very satisfying to convert ideas and code into solutions that help folks do what they want to do.
I really enjoy learning new things but to me, code has always been a means to an end. The journey is fun and truly enjoyable but at the end of the day going from A to B is the goal and it always makes me happy to see others be able to fulfill their goals.
I also released 26 episodes of my Running in Production podcast.
It’s a show where a new guest comes on every week and we talk about how they built and deployed a web app they’ve created, what tech stack they used, best tips and lessons learned. As a side note, quite a lot of folks ranging from solo developers to massively popular companies are using Docker in their day-to-day.
What do you anticipate will be Docker’s biggest announcement this year?
I have no idea what’s coming but I hope layer diffing and smart layer updates becomes a thing because one of the biggest time sinks of using Docker in development is having your application’s package dependency layer get invalidated from 1 change. That would be changing something like Python’s requirements.txt file, Ruby’s Gemfile or Node’s package.json file.
Changing a dependency usually involves having to wait 5-10 minutes for all dependencies to get rebuilt but without Docker, that same process would likely finish in 10 seconds or less. If layer diffing and updates were possible that could get things down to 10 seconds with Docker too.
That would be a very welcome change to have layer diffing and smart updates. Especially in new projects where you’re changing your dependencies on a regular basis.
What do you think is going to be Docker’s biggest challenge this year?
It’s hard to say but with Docker’s new primary focus on the developer experience, I’m optimistic because over the last few years it felt like Docker was a bit scattered trying to figure out who their target customer is and how to generate revenue.
I’m happy Docker finally figured out what they want to do. I don’t mean that in a condescending way either. I know how hard it is to find your true calling and target audience.
The biggest challenge would probably be figuring out how to make Docker a sustainable business. I hope it becomes one of those things where Docker transforms from an 80% upgrade / 10% sidegrade / 10% downgrade on some things to a 100% upgrade to the point where for something like web development it becomes a no brainer to always use Docker with no compromises.
Maybe I’m living in a fantasy world but I like to think that if things ever got to that point then the business problem would solve itself through either public funding or getting bought out by a company that will let everyone continue doing what they’re doing and make the best possible developer experience conceived on planet Earth.
What are some personal goals for the next year with respect to the Docker community?
I’d like to ship my next course which focuses on deploying web applications with Docker. This has been a long time coming and I’ve written and rewritten the course twice now over the last 2 years.
On the bright side, I’ve got everything I want to include in the course all put together. It’s everything I’ve learned from building and deploying Dockerized web apps since 2014.
If anyone wants to sign up to get notified with a launch discount when it’s released you can do so at https://nickjanetakis.com/courses/deploy-to-production.
Besides courses, I’ll continue blogging and creating YouTube videos about Docker and other web development topics just as I have for the last 5+ years.
Most of the blog posts, videos and courses I create come from real-world experience so I’m also looking forward to working with more folks this year as a part of my freelance business.
What talk would you most love to see at DockerCon 2021?
If I had to pull a request out of thin air I’d like to see assorted use case demos or presentations on how developers and companies are using Docker out in the wild.
Maybe some type of collaboration video where 5-6 people spend ~10 minutes going over their setups. Perhaps even have 2 of these videos. One with larger companies and one with solo developers or small teams. This way we can see usage patterns from multiple perspectives.
Looking to the distant future, what is the technology that you’re most excited about and that you think holds a lot of promise?
If you asked me this question 6 years ago I would have said Docker.
And I’m still going with Docker today because I can see a future where there’s a zero compromise development experience that’s lightning fast with flawless code editor integration in all editors.
That would be a wonderful place to be in.
Rapid fire questions…
What new skill have you mastered during the pandemic?
I’ve never been more confident in my ability to wash my hands.
Salty, sour or sweet?
Can I pick sweet and sour?
Dogs, cats, neither, both?
Turtles all the way down.
Beach or mountains?
Probably mountains because I really like hiking and you can escape the sun. But at the same time there’s something super relaxing about seeing and hearing the ocean. Tough question!
Your most often used emoji?
is what I commonly reach for on GitHub when leaving a reaction to something.
The post Captains Take 5 – Nick Janetakis appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/
One of the things that makes the Docker Platform so powerful is how easy it is to use images from a central location. Docker Hub is the premier Image Repository with thousands of Official Images ready for use. It’s also just as easy to push your own images to the Docker Hub registry so that everyone can benefit from your Dockerized applications.
But in certain scenarios, you might not want to push your images outside of your firewall. In this case you can set up a local registry using the open source software project Distribution. In this article we’ll take a look at setting up and configuring a local instance of the Distribution project where your teams can share images with docker commands they already know: docker push and docker pull.
Prerequisites
To complete this tutorial, you will need the following:
Free Docker Account You can sign-up for a free Docker account and receive free unlimited public repositoriesDocker running locallyInstructions to download and install Docker
Running the Distribution service
The Distribution project has been packaged as an Official Image on Docker Hub. To run a version locally, execute the following command:
$ docker run -d -p 5000:5000 –name registry registry:2.7
The -d flag will run the container in detached mode. The -p flag publishes port 5000 on your local machine’s network. We also give our container a name using the –name flag. Check out our documentation to learn more about these and all the flags for the docker run command.
Pushing and Pulling from a local registry
Now that we have our registry running locally, let’s tail the container’s logs so we can verify that our image is being pushed and pulled locally:
$ docker logs -f registry
Open another terminal and grab the Official Ubuntu Image from Docker Hub. We’ll use this image in our example below:
$ docker pull ubuntu
To push to or pull from our local registry, we need to add the registry’s location to the repository name. The format is as follows: my.registry.address:port/repositoryname.
In our example, we need to replace my.registry.address.port with localhost:5000 because our registry is running on our localhost and is listening on port 5000. Here is the full repository name: localhost:500/ubuntu. To do this, we’ll run the docker tag command:
$ docker tag ubuntu localhost:5000/ubuntu
Now we can push to our local registry.
$ docker push localhost:5000/ubuntu
NOTE:
Docker looks for either a “.” (domain separator) or “:” (port separator) to learn that the first part of the repository name is a location and not a user name. If you just had localhost without either .localdomain or :5000 (either one would do) then Docker would believe that localhost is a username, as in localhost/ubuntu or samalba/hipache. It would then try to push to the default Registry which is Docker Hub. Having a dot or colon in the first part tells Docker that this name contains a hostname and that it should push to your specified location instead.
Switch back to the terminal where our registry logs are being tailed. If you review the logs, you will see entries displaying the request to save our ubuntu image:
…
172.17.0.1 – – [26/Feb/2021:18:10:57 +0000] “POST /v2/ubuntu/blobs/uploads/ HTTP/1.1″ 202 0 “” “docker/20.10.2 go/go1.13.15 git-commit/8891c58 kernel/4.19.121-linuxkit os/linux arch/amd64 UpstreamClient(Docker-Client/20.10.2 (darwin))”
172.17.0.1 – – [26/Feb/2021:18:10:57 +0000] “POST /v2/ubuntu/blobs/uploads/ HTTP/1.1″ 202 0 “” “docker/20.10.2 go/go1.13.15 git-commit/8891c58 kernel/4.19.121-linuxkit os/linux arch/amd64 UpstreamClient(Docker-Client/20.10.2 (darwin))”
172.17.0.1 – – [26/Feb/2021:18:10:57 +0000] “POST /v2/ubuntu/blobs/uploads/ HTTP/1.1″ 202 0 “” “docker/20.10.2 go/go1.13.15 git-commit/8891c58 kernel/4.19.121-linuxkit os/linux arch/amd64 UpstreamClient(Docker-Client/20.10.2 (darwin))”
…
Now let’s remove our localhost:5000/ubuntu image and then pull the image from our local repository to make sure everything is working properly.
First print a list of images we have locally:
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
registry 2.7 5c4008a25e05 40 hours ago 26.2MB
ubuntu latest f63181f19b2f 5 weeks ago 72.9MB
localhost:5000/ubuntu latest f63181f19b2f 5 weeks ago 72.9MB
Now remove the localhost:5000/ubuntu:latest image from our local machine:
$ docker rmi localhost:5000/ubuntu
Untagged: localhost:5000/ubuntu:latest
Untagged: localhost:5000/ubuntu@sha256:3093096ee188f8…8c091c8cb4579c39cc4e
Let’s double check the image has been removed:
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
registry 2.7 5c4008a25e05 40 hours ago 26.2MB
ubuntu latest f63181f19b2f 5 weeks ago 72.9MB
Finally pull the image from our local registry and verify that it is now pulled to our local instance of Docker.
$ docker pull localhost:5000/ubuntu
Using default tag: latest
latest: Pulling from ubuntu
Digest: sha256:sha256:3093096ee188f8…8c091c8cb4579c39cc4e
Status: Downloaded newer image for localhost:5000/ubuntu:latest
localhost:5000/ubuntu:latest
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
registry 2.7 5c4008a25e05 40 hours ago 26.2MB
ubuntu latest f63181f19b2f 5 weeks ago 72.9MB
localhost:5000/ubuntu latest f63181f19b2f 5 weeks ago 72.9MB
Summary
In this article, we took a look at running an image registry locally. We also pulled an image for Docker Hub, tagged the image with our local registry and then pushed that image to our local registry running Distribution.
If you would like to learn more about the Distribution project, head on over to the open source project homepage on GitHub and be sure to check out the documentation.
The post How to Use Your Own Registry appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/
First off, a big thank you to all those who have already submitted a talk proposal for DockerCon LIVE 2021. We’re seeing some really excellent proposals and we look forward to reviewing many more! We opened the CFP on February 8th and with a few more weeks to go before we close the CFP on March 15th there’s still lots of time to submit a talk.
If you’re toying with the idea of submitting a talk but you’re still not sure whether or not your topic is interesting enough, or how to approach your topic, or if you just need a little push in the right direction to write up your proposal and click on “Send”, below are a few resources we thought you might find interesting.
Amanda Sopkin wrote a great article a few years ago that has now become a reference for conference organizers sharing tips on how to get a technical talk accepted for a conference. We also like Todd Lewis’ 13 tips on how to write an awesome talk proposal for a tech conference. Other interesting articles include:
How to write a successful conference proposal by Karolina SzczurTips for your next tech conference by Rob ReillyHow to prepare and write a tech conference talk by Lena Reinhard
The Audience at DockerCon
As you prepare to write your proposal, perhaps the most important thing to keep in mind is the audience you’ll be speaking to. Remember that the people in the audience will be a lot like you – keen to discover new ways to simplify and accelerate their workflow, and exploring the right choice tools, application stacks, and deployment environments for each project. You should also expect a broad spectrum of companies and organizations attending DockerCon, large and small, for-profit and non-profit, and from a plethora of industries (eg. aviation, education, retail, health, aerospace, finance, robotics, etc..)
What we are looking for
The theme of this year’s DockerCon is developer team collaboration in the new remote-first world.
Before submitting a talk proposal, please make sure that your topic falls under one or several of the following thematic buckets:
Team CollaborationConfiguring and managing teams in Docker Hub; Configuring and sharing local development environments;Secure DevelopmentSecurity best practices; Shifting security concerns left; Finding and fixing vulnerabilities;Best PracticesDockerfiles and build best practices; Setting up local development environments;Case Studies / Lessons LearnedLessons learned when starting with Docker toolchain; Case studies around streamlining and delivering features faster; Lessons learned as you matured your SDLC and Docker;Contributing to DockerHow to get started contributing; Understanding open source software and how Docker is developed;App Modernization and MigrationBest practices in refactoring monolithic applications to cloud-first using Docker; Moving your applications to the cloud;
First timer? Fantastic!
Everyone has to start somewhere and a virtual conference makes it a lot less intimidating to share your knowledge. If you aren’t sure what to talk about, think about an interesting problem you’ve solved, details of your day-to-day workflow, and ask a friend what they think you should talk about. Sometimes the best topics are things that a coworker finds interesting about your skills or role.
How DockerCon LIVE works
To allow for conversation and ensure a stress-free delivery for the speaker, session talks for DockerCon LIVE will be pre-recorded and played at a specific time during the conference. Speakers will be in chat with the audience during their session and be available to answer questions. Worry not– the Docker team will help speakers prepare, record and review their content. We love the virtual format of DockerCon LIVE and we are super excited about all the improvements we will bring to our conference platform which will provide an even better experience for speakers (new and seasoned) and attendees alike.
We’re here to help
We’re always happy to chat about your ideas or answer any questions you may have so make sure to join the DockerCon’s channel #dockercon2021 on our Community slack and drop us a line or just ping @Peter (Mckee) or @William (Quiviger) directly.
Last but not least don’t forget to pre-register here to receive notifications about when registrations for DockerCon LIVE 2021 officially open!
The post How to Write a Great Talk Proposal for DockerCon LIVE 2021 appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/
Next week, on Thursday March 11th, 2021 (8am PST/5pm CET) we’ll be hosting our next quarterly Docker Community All-Hands. This free virtual event, open to everyone, is a unique opportunity for Docker staff and the broader Docker community to come together for company and product updates, live demos, community presentations and a live Q&A.
As luck would have it, this All-Hands will coincide almost to the day with Docker’s 8th birthday (yay!). To mark the occasion, we’re going to make this event extra special by introducing :
a longer format (ie. 3 hours instead of 1 hour)lots more content (ie. demos, community lightning talks and workshops)regional content in French, Spanish and Portuguese!
We’re also really excited about the new video platform we’ll be using that makes it much easier for attendees to engage/connect/share with each other.
Who will be presenting
Members of Docker’s leadership team including Scott Johnston (CEO), Justin Cormack (CTO), Donnie Berkholz (VP of Products) and Jean-Laurent de Morlhon (VP of Engineering)Members of Docker’s product, engineering and community teamDocker Captains and Community Leaders
What we’ll cover
Company vision and product roadmap for 2021 and beyondHigh-level overview of Docker’s technology strategy Product updates and live demos of new features and integrationsCommunity news and updatesHands-on workshops and lightning talks presented by Docker CaptainsRegional workshops in French, Spanish and Portuguese by the community
Click here to register for the event and to view the detailed agenda.
The post Join Us Next Week for Docker’s Community All-Hands appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/
This is a guest post from Viktor Petersson, CEO of Screenly.io. Screenly is the most popular digital signage product for the Raspberry Pi. Find Viktor on Twitter @vpetersson.
In the previous blog post, we talked about how we compile Qt for Screenly OSE using Docker’s nifty multi-stage and multi-platform features. In this article, we build on this topic further and zoom in on caching.
Docker does a great job with caching using layers. Each command (e.g., RUN, ADD, etc.) generates a layer, which Docker then reuses in future builds unless something changes. As always, there are exceptions to this process, but this is generally speaking true. Another type of caching is caching for a particular operation, such as compiling source code, inside a container.
At Screenly, we created a Qt build environment inside a Docker container. We created this Qt build to ensure that the build process was reproducible and easy to share among developers. Since the Qt compilation process takes a long time, we leveraged ccache to speed up our Qt compilation. Implementing ccache requires volume mounting a folder from outside of the Docker environment.
The above steps work well if you are the only developer working on the project. What happens if you want to be able to have a shared cache across a team?
There are a few ways to accomplish this style of caching in Docker.
The easiest way to establish a shared cache is by following what we did in the previous article. We used disk cache along with some neat features for speeding up caching in BuildKit. We then compressed the cached files and distributed them to team members. The process is not very elegant, but it gets the job done.
If we want to automate the process a bit further, we can include retrieving the cache as part of the build process. An example of this could looks like this:
RUN curl -o /tmp/build-cache.tgz https://some-domain.com/build-cache.tgz &&
tar xfz /tmp/build-cache.tgz -C /tmp &&
rm /tmp/build-cache.tgz
This process above is neat, but it does mean that someone will need to periodically upload the build cache in order to keep cache files fresh. In addition, you need somewhere to store the files (such as S3).
It would be nice if we could avoid manual tasks and use native Docker technologies to do the same thing, right? As it turns out, we can use Docker to improve the process. We just need to use our imagination.
As we showed in the previous article, we can use multi-stage builds to copy data between different docker images. What if we move the cache to a dedicated Docker image? We can then push this image to Docker Hub and pull it into the build process.
The process is straightforward. Start by creating two different images in Docker Hub. Call them screenly/build-cache and screenly/build-env. Building on the previous article, we use this Dockerfile as the basis for screenly/build-env.
In the Dockerfile, we set the environment variable CCACHE_DIR to /src/ccache. This step tells ccache that the cache resides in /src/ccache. In the previous post, the step was just a volume mount to the system. However, in this case, we want to alter this step so that the cache lives outside of /src, as this is used for volume mounting the code base, such as /usr/ccache.
We can now launch the container with:
$ docker run –rm -t
-v ~/tmp/qt-src:/src
-v ~/tmp/qt-build:/build
-v ~/tmp/ccache:/usr/ccache
screenly-build-env
After you have run through your compilation, you can now build and push our cache image. The final Dockerfile will look like this:
FROM scratch
COPY ccache /ccache
To build this image, use the following code:
$ cd ~/tmp
$ docker build
-f /path/to/Dockerfile
-t screenly/build-cache
$ docker push screenly/build-cache
Finally, you can now include this layer in the Dockerfile for screenly/build-env. Add the line:
COPY –from=screenly/build-cache /ccache /usr/ccache
Next time you rebuild screenly/build-env, Docker will automatically pull down the cache. Also, you only need to add volume mounting when you are refreshing the cache.
About Screenly
Screenly is the most popular digital signage product for the Raspberry Pi. If you want to turn a physical screen into a secure, remote-managed device (over UI or digital signage API), Screenly makes setup a breeze. Users can display beautiful dashboards, images, videos, and web page content.
Screenly is available in two flavors: an open source version and a commercial version. You can try out our commercial version with a 14-day free trial.
The post Compiling Qt with Docker Using Caching appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/