The nomad developer setup #2: infrastructure as code
In a first article, I shared a quick and easy way to access VScode from any browser. You still need to create a cloud provider account and setup a server. In this second article I will share with you a way to automate all the steps needed from the moment you have created your account to using VScode in the browser. In order to do this I am sharing a GitHub repo at the end of this article. It contains all the Infrastructure as Code (IaC) you need.
IaC is a practice in software engineering, mostly on the devops side, that involves managing and provisioning infrastructure through code, rather than manual processes. It allows for the automated deployment and configuration of infrastructure, enabling consistency, scalability, and version control for your infrastructure.
The repository combines three very powerful tools: Packer, Ansible and Terraform.
- Packer is a tool to create machine images avoiding to re-install everything every time you start an instance.
- Ansible is an automation tool that simplifies complex tasks like configuration management. In a simple yaml file (a playbook) you can install and configure your server(s).
- Terraform is an infrastructure as code tool that enables the provisioning and management of cloud resources using declarative configuration files.
Please check the README carefully, it lists the current limitations and will be updated when the repo evolves.
In a next article I will add even more automation to it using a ci/cd (continuous integration and continuous delivery) pipeline using GitHub workflow to allow you to start/stop this infrastructure as you wish without accessing anything else than a web browser.
Happy Devops!
Share:
The nomad developer setup #2: infrastructure as code
copy:
https://bluwr.com/p/2233113
Part 3/5: 9 Hilarious Truths Only Ph.D. Students Will Understand
Ph.D. Life: When Your Brain Expands, and Your Social Life Disappears!
- Coffee Transformation: You start to believe that coffee is a basic human right.
- Time Bender: Somehow, all your deadlines are 'tomorrow'.
- Lab Maze Runner: You know your lab better than your own home.
- Conference Life: You're there for the free coffee and snacks.
- Email Excavation: Finding an old email feels like a treasure hunt.
- PDF Collector: You have more unread academic papers than unread emails.
- Thesis Magic: Turning random experiments into a thesis feels like a magic trick.
- Jargon Juggler: You speak a strange language that only five people in the world understand.
- Nap Ninja: Mastering the art of napping anywhere, anytime.
Share:
Part 3/5: 9 Hilarious Truths Only Ph.D. Students Will Understand
copy:
https://bluwr.com/p/1836675
Part 2/5: Humor in the Halls of Academia: A Light-Hearted Look at PhD Life
Here are some humorous and light-hearted "PhD" abbreviations:
- Permanently head Damaged (PhD): A playful nod to the intense intellectual effort involved in earning a PhD.
- Piled higher and Deeper (PhD): A humorous take on the depth and complexity of PhD-level research.
- Patiently hoping for a Degree (PhD): Reflects the long and often uncertain journey towards completing a PhD.
- Probably half Delirious (PhD): Acknowledges the stress and mental strain that can come with pursuing a doctorate.
- Pizza hut Delivery (PhD): A fun twist, imagining a PhD as something entirely different.
- Project half Done (PhD): For those times when it feels like the thesis will never be completed.
- Philosophically Disturbed (PhD): A witty take on the deep and often complex thinking required for a PhD.
These are meant in good humor and to bring a light-hearted perspective to the serious and commendable pursuit of a PhD.
Share:
Part 2/5: Humor in the Halls of Academia: A Light-Hearted Look at PhD Life
copy:
https://bluwr.com/p/1673181
Part 4/5: Understanding Personalities for Leadership in Academia and Industry
Know yourself, understand others, and watch life's opportunities unfold.
- Recognize Individual Differences: Acknowledge and appreciate the diverse personality types within your team, understanding how these differences can contribute to a rich, dynamic work environment in both academia and industry.
- Adapt Communication Styles: Tailor your communication to suit various personality types. This includes being aware of how different people prefer to receive information and feedback.
- Foster Inclusive Environments: Create a workplace culture that respects and values different personalities, encouraging open dialogue and collaboration in both academic and industrial settings.
- Leverage Strengths: Identify and use the unique strengths of different personality types. In academia, this could mean assigning research roles based on individual strengths, while in industry, it might involve delegating tasks that align with team members' innate skills.
- Manage Conflict Sensitively: Understand how different personalities might clash and develop strategies to manage conflicts effectively, keeping in mind the distinct environments of academia and industry.
- Encourage Diverse Perspectives: Promote an environment where varied viewpoints are welcomed and considered. This is essential for fostering innovation and critical thinking in both fields.
- Personalized Mentorship: Offer guidance and mentorship that resonates with the individual personalities of your team members, helping them grow and develop in their respective roles.
- Embrace Learning Styles: Recognize that different personalities may prefer different learning styles. Adapt your teaching and training methods accordingly in both academic and industrial contexts.
- Promote Self-Awareness: Encourage team members to understand their own personalities and how these impact their work and interactions. This self-awareness can lead to more effective collaboration and leadership.
- Balance Team Dynamics: Strive for a balance of personalities in teams to ensure a harmonious and productive work environment. This involves understanding how different personalities can complement each other in both academia and industry.
Share:
Part 4/5: Understanding Personalities for Leadership in Academia and Industry
copy:
https://bluwr.com/p/1493596
Part 3/5: Observational Learning for Effective Leadership in Academia and Industry
Paying close attention to the details teaches you a lot!
- Observe Leadership Styles: Focus on the behaviors and decision-making styles of leaders you admire in both academia and industry. Understand how they approach challenges and interact with their teams.
- Learn from Mistakes: Pay attention to the errors made by others. Reflect on these mistakes and contemplate alternative solutions or approaches you would adopt in similar situations.
- Seek Feedback: Consider feedback as a crucial learning tool. Use it to refine your strategies, communication, and leadership techniques.
- Study Communication Methods: Analyze how leaders effectively communicate complex ideas in academic settings and practical solutions in industry. Notice the clarity, tone, and engagement tactics they use.
- Understand Ethical Decision-Making: Observe how leaders handle ethical dilemmas, ensuring integrity and moral responsibility in both academic research and industry practices.
- Adaptability to Contexts: Learn how leaders modify their approach when dealing with academic theories versus practical industry applications. Understand the nuances and requirements of each sector.
- Collaboration and Team Dynamics: Watch how successful leaders foster teamwork and collaboration in both academia, where research projects often require interdisciplinary cooperation, and in industry, where cross-functional teamwork is key.
- Innovative Problem-Solving: Notice how leaders in both fields use creativity and innovation to solve complex problems. See how academic theories can be applied in practical industry scenarios.
- Mentorship and Development: Observe how leaders nurture talent and encourage growth in their teams, both in academic environments and in the workplace.
- Continuous Learning and Adaptation: Recognize the importance of ongoing education and staying abreast of current trends and research in both academia and industry to inform effective leadership.
Share:
Part 3/5: Observational Learning for Effective Leadership in Academia and Industry
copy:
https://bluwr.com/p/1492352
Part 2/5: The Power of Listening: A Key to Enhancing Your Leadership Skills
Listen more than you speak, and watch your world transform.
- Building Trust and Respect: Leaders who actively listen to their team members cultivate an atmosphere of trust and respect. This approach demonstrates that the leader values their team's opinions and insights, fostering a more open and collaborative work environment.
- Enhancing Decision-Making: Listening provides leaders with a broader perspective and more information, which is essential for informed decision-making. By understanding the viewpoints and concerns of their team, leaders can make decisions that are better aligned with the needs and goals of the organization.
- Conflict Resolution: Effective listening is key in resolving conflicts. By listening to all sides of a disagreement, a leader can understand the underlying issues and work towards a solution that addresses the concerns of all parties involved.
- Encouraging Innovation and Creativity: Leaders who listen are more likely to hear and encourage new ideas. This openness can foster an innovative culture where team members feel valued and motivated to contribute creatively.
- Improving Team Dynamics: Listening helps leaders identify and address issues within the team, whether they are related to workflow, interpersonal relationships, or resource allocation. Addressing these issues promptly can lead to a more efficient and harmonious work environment.
- Personal Growth and Learning: Leaders who are good listeners continuously learn from the people around them. This not only enhances their leadership skills but also keeps them connected to the latest trends, concerns, and opportunities within their organization.
- Employee Motivation and Engagement: Employees feel more engaged and motivated when they know their voices are heard. This can lead to increased job satisfaction, lower turnover rates, and a more committed workforce.
- Modeling Positive Behavior: When leaders demonstrate effective listening skills, they set a positive example for the entire organization. This can lead to a culture where everyone listens to each other, improving overall communication and collaboration.
Share:
Part 2/5: The Power of Listening: A Key to Enhancing Your Leadership Skills
copy:
https://bluwr.com/p/1490749
Part 1/5 : Acquiring Self-Development and Leadership Skills: Beyond Innate Abilities
Becoming a great leader can transform your life, making you not only productive and satisfied but also widely admired.
"The Power of Listening"
- Practice active listening by giving full attention to the speaker.
- Avoid interrupting and ask clarifying questions to show engagement.
- Reflect on what is said and respond thoughtfully, demonstrating that you value their input.
"Observational Learning"
- Observe leaders you admire and note their behaviors and decision-making styles.
- Learn from mistakes made by others, and think about how you would handle similar situations differently.
"Navigating Team Dynamics"
- Pay attention to the unique strengths and weaknesses of each team member.
- Facilitate open and inclusive discussions to allow diverse perspectives to flourish.
- Resolve conflicts by understanding the underlying issues and motivations.
"Emotional Intelligence in Leadership"
- Work on self-awareness to understand your emotions and how they affect others.
- Practice empathy by putting yourself in your team members' shoes.
- Develop your social skills, like effective communication and conflict resolution.
"Understanding Personalities"
- Study basic personality types and traits to better predict and understand behaviors.
- Be adaptable in your approach to different personalities, customizing your leadership style as needed.
- Show genuine interest in the personal and professional growth of your team members.
Share:
Part 1/5 : Acquiring Self-Development and Leadership Skills: Beyond Innate Abilities
copy:
https://bluwr.com/p/1489744
The nomad developer setup #1: A guide for beginners
Fun fact, I first wrote this article on another platform when working on Bluwr in a train. No matter the distance, it is always nice to be able to work from anywhere you want. All you need for this setup to work is an access to a web browser.
In this article I will share part of the setup that I am using. It is the first one of a series where I will be covering the whole setup I am using.
This first article is about how to set up vscode to work from any device with a web browser. Visual Studio Code is a text editor by microsoft. It can be customized with an almost infinite number of plugins. We will be using vscode in a client/server mode. The vscode server will be running on a virtual machine hosted by a cloud provider, the client can be any web browser. We will use the browser to connect to the vscode server. The interface inside the web browser will be identical to the standard vscode interface, and you will be able to edit any file on the virtual machine.
So first you need a host. Any cloud provider will do, the only thing you need is an IP address and a user that can ssh to the host. Side note here, I almost exclusively use ssh keys, never user/password to connect to cloud hosts as it is way more secure.
Once the ssh session started, install docker if not already available on the host. the execute the following command:
;;
docker run -d \
--name=code-server \
-p 8443:8443 \
-e PASSWORD=”1234” \
ghcr.io/linuxserver/code-server
;;
We could basically end this article right now. However, there are a few more things I want to talk about. These points took me a bit of time figure out and I thought I’d share them with you:
1. How to make sure you don’t have to re-install all your plugins every time you start a new code server instance
2. How to make sure your settings stored, so you don’t have to manually re-enter them every time you restart your docker container
3. How to set a custom working directory where all your code will be stored
These are all technically achieved using the same principle: bind mount a folder of your host to a dedicated folder in the docker container.
If you look at the container folder structure, you can see that all plugins are installed in the /config/extensions folder. Vscode configuration in the container is stored in /config/data/User/settings.json. If you have been using vscode for sometime and would like to use that same configuration, you can take that existing settings file and put it somewhere on your virtual machine. Finally, to get a defined workspace, you can bind mount the folder where you usually put your code to the one that is dedicated to it in the container.
The full command is :
;;
docker run -d \
--name=code-server \
-p 8443:8443 \
-e PASSWORD="1234" \
-v "/home/username/vscode_extensions:/config/extensions" \
-v "/home/user/vscode_settings:/config/data/User/" \
-v "/home/user/workspace/:/config/workspace" \
ghcr.io/linuxserver/code-server
;;
To save money, I only start and pay for cloud resources when I need them. Of course, I don’t repeat all these steps and re-install all the tools I need each time I start a new virtual machine. I use a packer/ansible/terraform combination to create a snapshot that I can use as a base image each time I create a new host. This will be the subject of my next article.
Now, working from anywhere as a digital nomad is really nice and convenient, but does not mean you should work all the time. I made this setup originally only to be geographically free, I still make it a point to have a healthy work/life balance. I have many hobbies and would not trade them for more hours of coding.
Share:
The nomad developer setup #1: A guide for beginners
copy:
https://bluwr.com/p/873145