API scripts: CML and Vsphere

In the last months I have been trying to practice the knowledge from CCNA DevNet and managed to wrote very basic scripts using API.


CML is a simulation solution from Cisco that actually works (you have to pay and need hardware). There are nice docs out there:

CML sandbox

CML Starting guide + API examples (this saved me)

CML simulation lifecycle example (havent tried yet)

CML: I actually struggled in this one regarding how to authenticate….. Checking some pages I worked out. I was trying to use the theory from DevNet but no joy. The idea is to restore a lab after you have made many changes. The script log into CML, delete the lab and restore with a provided backup.


Some docs for vsphere api:

Vsphere create session: (quite useful)

Vsphere postman examples (need to take a look)

Vsphere: This is even simpler…. at least in this one I didnt struggle with the auth as the documentation was quite clear. But the original goal of restore a VM from a snapshot looks like is not available via API.

OpenAI / ChatGPT

I guess this is a bit old news already. But I wanted to test it for some weeks. I have just made one question so far (and it failed a couple of times until I got an answer.

And my very first question was to list the most famous quotes from Aristotle to his actual writings. Why? Because you read many quotes from many famous people that are not actually true and it is very hard to really track if you dont read all books from that person. And to be honest, philosophy is not easy to digest.

Here are a few famous quotes from Aristotle that reference his actual writings:

"Happiness is the meaning and the purpose of life, the whole aim and end of human existence." - Nicomachean Ethics

"It is the mark of an educated mind to be able to entertain a thought without accepting it." - Metaphysics

"We are what we repeatedly do. Excellence, then, is not an act, but a habit." - Nicomachean Ethics

"The whole is greater than the sum of its parts." - Metaphysics

"Nature does nothing in vain." - Politics

Please note that these quotes should not be taken as direct verbatim from Aristotle's work but rather as a representation of his thoughts.

Apart from that, I wonder how is the infrastructure of this company? Is on premise or cloud? How is their DC network design? TCP? Checking one of the open positions it seems they have a pretty big cluster. Although they mention cloud platforms. And the company has some kind of agreement with MS (so Azure is going to be used)

Donuts

Dough Ingredients (12 units):

  • 660g strong flour
  • 75g sugar
  • 5g salt
  • 60g unsalted butter
  • 30g liquid egg
  • 20g dry yeast
  • 150g warm water
  • 150g milk

Filling/Coating

  • egg wash
  • 100ml boling water + 100g sugar + cinnamon stick + star anise
  • jam
  • double cream: whipped + vanilla essence or 1tsp of coffee.

Process

  • Warm water and milk at body temperature. Then add yeast and mix.
  • In a bowl, mix flour, salt and sugar. Then rubber the butter until you have a breadcrumb look mix.
  • Add egg to the milk and mix.
  • Add liquid mix to the flour.
  • Mix all together until forming a ball.
  • Knead on the table until you have a smooth ball. When you poke it, it should spring back in slow motion. For 7-10 minutes aprox.
  • Put the dough in the bowl, with a bit of oil, cover with cling film and let it prove until double in size. This is the most difficult thing to do at home. Try to put in a switch-on oven with a bit of boiling water in a small pan to simulate a proving machine (40C?). In a proving machine takes 1h.
  • In a lightly flour surface, tip your dough and roll it as a long ping. Use a scale and cut 12 pieces. It should be 92g each aprox.
  • With each piece, make a ball, with one plant of your hand, push to the table and start rolling releasing pressure until a ball forms. Put each ball in a tray with baking paper. Cover the pieces while you make the balls.
  • Prove the balls again until double in size. Try the oven again with a bit of boiling water. 1h aprox. You can as well, try donuts with a whole. Just with a dusted finger, make a whole in the middle and spin the dough. Be sure the whole is quite big in diameter and when it proves may close.
  • Second most difficult part. Deep frying. Keeping the temperature is critical so your will need a temperature prove and patience. Be sure the oil is at 170C. Add two balls (max) in you have a deep fryer. If you use a sauce pan, fry one ball at each time. Fry aprox for 1 minute each side. Ideally you should have a white lien in the middle. If the oil is below 170C the donuts will get soggy, too hot, they will burn. So again, be patience.
  • As well, you can bake in the oven, aprox 10 minutes at 180C. Just give it an egg wash and bake until golden. Use a toothpick to check they are baked inside. Then give it a sugar-water coating immediately after taking out of the oven.
  • For the deep-fry donuts, let them cool down. Then coat them with a mix of sugar/cinnamon.
  • Now you can add the fillings. With a knife, make a hole in the white line and pipe your filling. For the oven ones, cut in the middle around 3/4 and pipe your fillings.

This is my outcome:

I filling some with coffee cream, jam and plain cream.

They were really nice. I didnt expect this result. Again, critical is the proving and deep frying at the correct temperature.

Building DCs with VXLAN BGP EVPN

VXLAN/EVPN is a technology that I am trying to understand in more detail and depth since I started my current job. I am used to “learn” reading books and all my networking theory knowledge comes from books so this one is a good base. I take it as good for beginner/intermediate level but as well, it is a bit “old” as it was released on 2017. In the last month I have built my confidence with VXLAN/EVPN via some issues and testing designs (Arista EVPN L3 Gateway).

As I used to do in the pass, I made notes of the book and I will put them here too so it is a good refresh.

1 INTRO

2 BASICS

3 FORWARDING

4 UNDERLAY

5 MULTITENANCY

6 UNICAST FORWARDING

7 MULTICAST FORWARDING

8 EXTERNAL CONNECTIVITY

9 MULTIPOD, MULTIFABRIC, DCI

10 L4-7 SERVICES INTEGRATION

11 FABRIC MANAGEMENT

IPv6 BIG TCP / Replace TCP in DC: Homa

This week a colleague pass this link about running kubernetes cluster running on Cilium. The interesting point is the high throughput is achieved by BIG TCP and IPv6!

The summary (copied) is:

TCP segments in the OS are up to 65K, NIC hardware does the segmentation – we do this now, but the 65K is a limitation of IPv4 addressing.  BIG TCP uses IPv6 and allows much large TCP segments within OS currently 512K but theoretically higher.  End result – better perf (>20% higher in this video) and latency (2.2x faster through the OS).

Then I saw this other video from John Ousterhout. It is similar topic as the Kubernetes video above as K8S is used mainly in datacenters.

High performance:
– data throughput: full link speed for large messages
– low tail latency: <10us for short messages? (DC)
– message throughput: 100M short messages per second? (DC)

TCP issues in DC:
1- stream oriented (no load balancing) -> message based
2- connection oriented (can break infiniband!, expensive,)-> connectionless
3- fair scheduling (bw sharing) -> run to completion (SRPT)
4- sender-driven congestion control (based on buffer occupancy) -> receiver- driven congestion control
5- in-order delivery -> no ordering requirements

As well, it is important the move to NIC (as there is already a lot of NIC offloading).

His proposal for HOMA looks very nice but I like how he explains how dificult is going to be successful. Still worth trying.

Prelude to Foundation

Before last book of Foundation series. I was a bit reluctant to follow but I was actually surprised by this book. It is all about the beginning of psychohistory by Hari. I assumed it would be a bit dull but looks like a bit like Doctor Jones being Indiana Jones 🙂

And the end is quite a twist I didnt expect. So looking forwards for the next.

Soda Bread and Naan

Soda Bread Ingredients:

  • 170g self raising flour
  • 170g plain flour
  • 1/2 tsp salt
  • 1/2 tsp bicarbonate of soda
  • 290ml (1/2 pint) buttermilk

Soda Bred Process:

  • Pre-heat oven at 200C
  • Mix the flours, salt and bicarbonate into a large bowl.
  • Make a well in the center and pour the buttermilk, mixing with a fork to form a soft dough.
  • Knead for 3-4 minutes in a lightly floured surface.
  • Form a ball with the sides of your hands, flatten a bit the top.
  • Cut the ball in 8 pieces with a big knife. Use a bit of oil so the knife doesn’t stick.
  • Let is rest for 15 minutes. Prepare a tray lightly floured.
  • Bake for 30 minutes. Check with a toothstick that comes out clean. And it should sound hollow when tapping the bottom.
  • Cool in a wire rack.

Ingredients for Peshwari Naan Bread:

  • 3/4 tsp instant yeast
  • 1/2 tsp sugar
  • 60ml body temperature water
  • 140g plain flour
  • 1/4 tsp salt
  • 60ml/54g Greek style yogurt
  • 1/2 tsp vegetable oil

Naan Filling:

  • 28g butter
  • 1 tbsp desiccated coconut
  • 24g raisins
  • 22g almonds

Naan Process:

  • Mix yeast, sugar and water. Wait a 1-2 minutes until the liquid is a bit bubbly.
  • Mix flour and salt in a bowl
  • Add the water mix to the yogurt and oil.
  • Add the yogurt mix to the flour. Mix well with a fork
  • Knead for 5 minutes. It is going to be sticky. Add a bit extra flour if needed.
  • Put the dough back in a lightly oiled bowl.
  • Let is prove until double in size. 1h at least
  • Prepare the filling. In a chopping board put all ingredients but butter. Chopped all them until they are fine.
  • Add the butter, mix all ingredients and form 3 balls.
  • Once the dough has risen. Divide in 3 parts.
  • With a lightly floured rolling pin, roll each dough into a small circle, put a piece of butter in the middle. Wrap it with the rest of dough.
  • Roll the dough ball with the pin trying to form an eye-drop. It should be quick, not many passes with the pin.
  • Put the naans on a ligthly floured towel.
  • Heat up a skillet. Once hot, (just a drop of oil), put a naan. Wait until puffs up and start to get brown dots in the bottom.
  • Flip and wait for the same. Check it doesnt burn! Likely less than 1 minute.
  • Repeat for the other naans.

This is the result:

The soad bread was very tasty and super quick to make!!!

The naans were tasty too. I guess the filling can be very different.

Aquafaba Cherry Brownie

I had aquafaba left over from making humus and always wanted to do something simple with it. As well, it has been a long time since I do brownies. So found a recipe that mixed both:

Ingredients:

  • Liquid from a can of chickpeas (around 120ml)
  • 290g sugar (I think it is too much)
  • 150g dark chocolate (I used 85% dark) chopped
  • 110g margarine
  • 180g plain flour
  • 40g cocoa powder
  • 1 tsp salt
  • 1 tsp vanilla extract
  • 1 tsp coffee powder
  • optional: chocolate chips (I didnt use…)
  • 2 handful of frozen cherries

Process:

  • Pre-heat oven at 175C
  • Let the frozen cherries to get to room temperature. Dont add them frozen to the butter (as I did…) as it will solidify it….
  • Sift flour and cocoa powder.
  • In another bowl, mix sugar and aquafaba. I dont have a mixing attachment to my hand blender so I did it manually. I didnt get to the point as in the video.
  • Add the vanilla, salt, coffe to the liquid. Fold it with a spatula.
  • Melt the margarine and chocolate using Bain Marie. I ran out of bowl and had to use a saucepan directly on the heat….
  • Pour the melted chocolate over the aquafaba mix. Fold everything together.
  • Add the flour mix to the wet ingredients. Combine properly but dont over mix.
  • Add the chocolate chips and cherries if you want to. Mix all a bit.
  • Pour the butter into a baking tin covered with baking paper. Mine is 30x20cm and I think it is a bit too big. You dont have to spread the butter everywhere if you want a bit thicker brownies.
  • Bake for 30-35 minutes. Use a toothpick to check if the center comes out with a bit of moister. Dont over bake it! (as I did)
  • Let the brownies to cool for 0 minutes then you can cut them.

To be honest, I made many mistakes. The worse one was adding the cherries frozen!!! And I left the brownies too long in the oven. As usual, more practice!!!

I think my normal brownies are much better but still it was a way to use aquafaba. Need to find more usage for that anyway.

Calzone

This dough can be used for pizza too. And the filling is quite personal.

Ingredients for dough (x2 calzone)

  • 225g plain or strong white flour + dusting
  • 90ml milk warmed at body temperature
  • 50ml water warmed at body temperature
  • 1 tsp dried yeast
  • 25ml olive oil
  • pinch salt

Filling:

  • cherry tomatoes
  • 1 mozzarella roughly chopped
  • any cold meat if you wish
  • capers, oregano
  • grated parmesan
  • olive oil
  • some slices of onion
  • some tbsp of tomate sauce

Process

  • Sift the flour and salt in a bowl.
  • Warm the milk and water in a saucepan. Just body temperature! If too hot, will kill the yeast. Add the dry yest and mix.
  • Add the milk mix to the flour, mix a bit and then add oil. Mix well.
  • Knead until smooth and the window test passes.
  • Let me it proof until double in size.
  • Pre-heat oven at 250C.
  • Mix all your filling ingredients in a bowl.
  • Dive the dough in two, roll in a big circle around 23cm or so.
  • Put the filling in the middle. Dont put too much so you need to “close” the dough.
  • Brush the dough edges with water, then fold half the side over to cover the filling.
  • Pinch the edges “covering your thumb”.
  • White a knife score the top of your calzone.
  • Bake until dough is golden.

It looks like a big “empanada” but still was good.

To be honest, I need to practice more my pizza dough. It is quite far from any good pizza I have tried.

Rosquillos

This is typical sweet from my hometown and never tried to bake it until yesterday. I have been in the bakery (“horno”) twice in the last two years and just got an idea of the ingredients but never been brave enough to ask for the proportions so this is just a guess…

Ingredients:

  • 200ml water + 25g sugar + 2 star anise
  • 100ml orange juice
  • 200ml olive oil
  • 400g strong white flour (harina pastelera)
  • 120g caster sugar
  • 50ml anise (43%) – I used sambuca

Process:

  • Boil the water, sugar and star anise. Let it simmer for 5 minutes. Then cool down.
  • In a bowl, mix all ingredients. Just add 150ml from the water mix above.
  • Knead for 15-20 minutes until smooth. It doesnt stick much as it has lot of oil.
  • Let the dough to rest for 30 minutes in the bowl.
  • Using a scale, make 6 balls, aprox 150g each. Be sure they are tight balls.
  • Let them rest for 1h or so in a tray with a bit of flour as anti-stick. I used two trays. The idea is to try to prove the balls (in my case it didnt happen…)
  • Pre-heat oven at 175C
  • Make a hole in the middle, like a “rosquilla” and the try to make “picos” in the sides. I failed miserably with the “picos”.
  • Put one tray in the oven, bake until golden.
  • Bake the second tray.
  • Let the “rosquillos” to cool down.

My version:

The real deal:

So still a bit off target 🙂

The real “rosquillos” uses only anise (liquor). But it can be dangerous to use at home because if the oven has not good ventilation, the alcohol can blow it, so for that reason I just used it a bit and try to replace it with the water+star anise.

In summary, my version is eatable. I didnt have to throw them away so that’s a win at the end. The flavour is still far from the original but tasty nonetheless.

Another thing, I had the oven at 230C initially so the first batch went to dark and inside wasnt very well cooked. And this morning were quite hard. I remember the original ones go hard too but no the next day. Still it was tasty today though.

So possible modifications/incognitas:

  • Bake at 175C (already updated instructions)
  • Less olive oil, 150ml?
  • A bit more anise alcohol?
  • how to make them prove?

I guess I will try again soon as the process and ingredients are not “difficult”. It was to find a decent proportion. Hopefully next year I will go back to the bakery and ask for the proportions.

2nd Attempt:

  • 150ml water + 25g sugar + 2 star anise
  • 100ml orange juice
  • 100ml olive oil
  • 450g strong white flour (harina pastelera)
  • 120g caster sugar
  • 50ml anise (43%) – I used sambuca

Super sticky dough, not much better 🙁

3nd Attempt:

  • 100ml orange juice
  • 150ml olive oil
  • 450g strong white flour (harina pastelera)
  • 120g caster sugar
  • 100ml anise (43%) – I used sambuca

No sticky dough (good to remove water+sugar+anise), but still not raising. It releases liquid…. I think I need to put less liquid (of everything)?? It is the flour correct? The recipe needs “Harina Pastelera” and when asked what was the difference I was told it was the “strength” so I have assumed I need “strong” white flour… Next time I will try to make “Harina Pastelera”.