GNS3 is an amazing tool that allows IT professionals to, quite simply, create a virtual lab. The software can virtualize or emulate a variety of systems called appliances. These appliances range from Cisco routers and switches to nodes such as Windows Server, CentOS, and Fedora. GNS3 also has the capability to utilize containers. If you’re designing and testing proof-of-concept ideas, recreating environments for troubleshooting, or want to delve into the world of network engineering, GNS3 might be for you.
As seen on their website, GNS3 is well acquainted in the enterprise world. Companies using it span from tech businesses like Intel, to scientific organizations like NASA. Even renown banks and telecom companies are included in the list. This adds great credibility to the power and reliability this open-source tool provides.
Installation
For Fedora users, GNS3 can be easily installed from the official repository. From the command-line type:
sudo dnf install gns3-server gns3-gui
The reason for the separate packages is because GNS3 can be configured as a dedicated server. This is useful for teams to collaborate while working on a project, or problem. The dedicated servers can be installed on bare-metal or as a virtual machine.
GNS3 requires a computer with virtualization capabilities. This allows the software to utilize the computer’s hardware to increase the performance when running the appliances. To use Spice/VNC as a console install the virt-viewer package.
When the installation is complete, an icon will be placed among the applications for GNS3.
Initial setup
Opening GNS3 for the first time will open the Setup Wizard. The options on the first screen allow users to either setup an isolated VM environment, run the topologies from the local computer, or to use a remote server. The examples in this article are performed on the local machine.
The next screen configures the application to connect to the local machine running GNS3 server. Here we see the path to the application installed locally on the server, host binding address, and port. These settings can be tweaked to match your setup. However, for a quick setup it’s best to accept the defaults.
Once the settings are verified, a confirmation will appear stating the connection to the local server was successful. The last screen in the wizard will provide a summary. Click the Finish button to complete the setup.
Finding appliances in the GNS3 Marketplace
Before venturing into the GUI, this would be a good time to visit the GNS3 Marketplace. The marketplace contains appliances, pre-configured labs, and software for use with GNS3. The options in the Marketplace are vast and beyond the scope of this article. However, let’s download an appliance to see how it works.
First, select the appliance you want (the examples in this article will use OpenWRT). Select the template for that appliance to download. Appliance templates are JSON files with the extension gns3a.
You can also install OS nodes without a template, or create your own. OSBoxes.org has a variety of pre-built VMWare images (VMDK) that are compatible with GNS3. For this article we’ll use the Fedora 64-bit VMWare image. You can also find images for many other distributions such as CentOS, Ubuntu, and Kali Linux.
You may also need to install Dynamips which is not included in the official repos. However, a simple web search will point to the RPM package.
Importing appliances to GNS3
Now that we have some appliances let’s build a small and simple topology using the templates and images we just downloaded.
After the initial setup the New appliance template window will open. From here we can import template files like the gns3a file downloaded from the Marketplace. Other options for adding appliances without a template include IOS devices, VMs, and Docker containers.
To add the OpenWRT router, click Import an appliance template file. This will open the Add appliance wizard. Review the information on the first screen which shows the category, vendor, architecture, and KVM status for that appliance, and click Next. Now select the Server type to run the appliance and click Next. This is where we can specify whether we want to run it on a remote server, in a GNS3 VM, or on the local machine. After verifying the server requirements click Next to continue the installation.
At this point it’s time to install the image file for the OpenWRT appliance. Select the version and click the Download button. This will go to the site containing the image file and download it. This article will use OpenWRT 18.06.4 downloaded from the project’s website. If the version of the image is not in the list, click the button to Create a new version, and enter the version number (in this case 18.06.4). Select the filename and click Import to import the image. GNS3 will then ask if you would like to copy the image and decompress it (if necessary). Accept it and complete the install.
Adding appliances without a template
To add the Fedora VM downloaded from OSBoxes, click on one of the icons on the left and select New appliance template near the bottom. Select Add a Qemu virtual machine and click Next. Enter a name for the appliance (in this case Fedora 30) then click Next. Verify the QEMU binary path and input the amount of RAM to use for the VM, then select the Console type. On the next screen select New image and browse for the VMDK file. Depending on the file-size it may take a few moments. To copy/import the image select Yes and once it’s completed click Finish.
Adding and connecting nodes in GNS3
Now that we have some appliances, let’s build a simple topology with OpenWRT and Fedora in GNS3. The icons on the left represent Routers, Switches, End devices, and Security devices. The second-last shows all appliances, and the bottom option is to Add a link which connects the nodes to each other.
Click on the Routers icon and drag the OpenWRT router onto the empty workspace to the right. Click on the End devices icon and do the same for the computer node. Depending on how large the file is, it may take a few moments for the PC node to appear in the workspace. To connect the nodes, click Add a link then click on a node, select the interface (i.e. Ethernet0), then do the same with the other node (as seen in the demo below).
You can customize the consoles by going to the menu bar and selecting Edit > Preferences > General. Select the tab for Console applications and click the Edit button. From here you can choose your favourite terminal in the drop-down menu and even customize it in the text-box below.
Once everything is in place, start the nodes by clicking the green (play) button at the top. The lights in the Topology Summary section will turn green indicating the nodes are on. To open the consoles for the nodes, click the Console to all devices button to the left (it looks like a terminal icon). The Remote Viewer window for Fedora and a terminal window for OpenWRT will open.
Once complete you can turn off the nodes individually by right-clicking on the node and selecting Stop, or to stop all nodes click the red Stop button in the top bar.
Conclusion
GNS3 is a powerful piece of software with features that are beyond the scope of this article. The software is similar to Cisco’s Packet Tracer. However, Packet Tracer is a simulator with limitations to the program’s coding. GNS3 on the other hand virtualizes/emulates the nodes using the hardware’s actual OS. This provides full functionality and a closer experience to the actual hardware.
The GNS3 documentation site offers an enormous amount of resources that delve further into the workings of the application. They also offer training courses for those interested in digging deep into the workings of the software.
Random: Don’t Worry, Nintendo Switch’s ‘X’ Button Is Still Called ‘X’
Before anyone gets too concerned, we’re happy to confirm that the X button found on your Nintendo Switch Joy-Con or Pro Controller is, and always will be, called ‘X’. Because of course it is.
As you may well be aware, the PlayStation corner of the internet has been in absolute meltdown over the last few days after PlayStation UK revealed that the DualShock controller’s ‘X’ button is actually referred to as ‘Cross’. We’re sure you’ll agree that this simply cannot be correct; indeed, our chums over at Push Square found that roughly nine out of ten players call it ‘X’.
Here’s the now-infamous reveal itself:
Concerned for the Nintendo community and gaming fans at large, we decided to get everyone in the office to stop what they were doing, find a computer, and search for any evidence of Nintendo pronouncing the names of its controller face buttons. It was a surprisingly difficult task, but we’re happy to confirm that it is indeed called ‘X’, as proven by Nintendo’s very own JC Rodriguez.
You’ll hear it at the 8:15 mark below.
Phew! Thank goodness.
Now, go ahead and rest easy for the rest of the day – you can thank us later.
Review: Blasphemous – A Nightmarishly Good Mix Of Metroid And Dark Souls
The Game Kitchen’s Blasphemous opens with its central protagonist, the metal-masked Penitent One, last survivor of the Silent Sorrow Massacre, staggering to his feet atop a mass grave of bodies, each one an exact replica of himself. Here is a hero caught in an endless cycle of death and rebirth, charged with lifting a great curse that’s descended upon the land of Cvstodia. Sword in hand, he makes his way down a flight of steps, surrounded on all sides by crucified bodies and mounds of broken, rotten corpses wrapped in twisted thickets of thorn. From here he must venture forth on a solemn pilgrimage to seek the Cradle of Affliction and discover the seed of his anguish hidden behind a sacred door in the Mother of Mother of Churches.
Blasphemous has been wowing its many Kickstarter backers for the past couple of years with screenshots of the sumptuous pixel art-style which brings to life its incredibly detailed world, a world filled with twisted religious iconography, grotesque enemies, brutally warped boss battles and imposing landscapes dripping in blood, filth and decay. From its opening level set around the dusty Spanish-styled village of Albero and onwards across the Wastelands of the Buried Churches to the Desecrated Cistern – a festering, toxic labyrinth that descends into the foreboding depths of Jondo – this really is spectacularly well-realised stuff.
Of course, without gameplay to match, all this beauty would be for nothing, and so it’s fortunate that The Game Kitchen has pulled something pretty special out of the bag here; a heady mix of Soulslike and Metroidvania, with the rules of life and death governed in much the same way as FromSoftware’s titles, whilst the backtracking traversal and pixel-perfect platforming falls much more into the classic Metroid mould.
In terms of that Souls influence, there are bonfires, here known as Prie Dieu, at which to rest and recuperate your energy, resetting enemies across your current level as you do so. Estus flasks are replaced by Biliary flasks, upgradeable by finding and refilling empty ones scattered across the game world. You have a magic bar, here known as Fervor, which charges as you attack enemies, the twist being that each time you die a little of the bar becomes lost until you return to your place of death to retrieve it or pay to have it restored at a place of penitence. Speaking of currency, Tears of Atonement replace souls and are, happily, not lost upon death. As well as cleansing your guilt, they can be used to buy some of the various trinkets and abilities you can equip as you advance through the game, as well as the offensive skills you unlock as you level up your weapon.
Making your way across Cvstodia to carry out the Three Humiliations required to gain entry to the Mother of Mother of Churches, the Penitent One has only one weapon at his disposal: the Mea Culpa sword. Despite this initially disappointing lack of choice in terms of weapons, it turns out that concentrating on one means of combat has enabled The Game Kitchen to ensure it’s a tight and satisfying affair, embellished with lots of bespoke little animations that really drive home the delicious brutality of engagements. Every foe you encounter can be stunned and then ended with an outrageously violent finishing move, each one beautifully animated and entirely unique for every single enemy type in the game.
Alongside your sword, your move-set is comprised of a magic attack (several of which can be found and equipped as you progress), a dodging slide which makes you temporarily invulnerable and can be added to with its own powerful lunging attack, and a parry with which to deflect incoming strikes, opening your adversary up to some horrific retribution. It’s very much Dark Souls sans a stamina bar, losing the need to take time to recuperate in favour of a protagonist who can carry out endless combos which, nevertheless, require the same patience and forward-planning as FromSoftware’s encounters if you’re to be successful.
The ebb and flow of combat is further enhanced by how uniformly well-designed the different enemies you encounter across Cvstodia are, each coming with their own smart set of attacks that you’ll need to learn to defend against in order to proceed. Priests in the Archcathedral Rooftops, for example, wield long, stabby candleholders and need to be dodged just before they lunge, giving you a clear sight of their exposed flanks. The exploding disease-ridden ghouls in the bowels of the Desecrated Cistern, meanwhile, will continuously reanimate unless you find a nearby bell-ringer and cut them down. Each new area is stuffed full of new challenges and there’s much more to combat across Cvstodia than just hacking and slashing your way through all-comers; you’ll need to change up your attack style and make use of the many trinkets and abilities at your disposal if you hope to get anywhere.
You can equip Rosary Beads to bolster your attack or defence, or perhaps give yourself a boost against certain types of magic or elemental attacks. Initially, you’ll only be able to equip three beads but there are a total of nine notches to unlock as you progress. There are also religious relics to wear around your belt which very cleverly open up traversal options by letting you see hidden ledges, for example, or perhaps hear the final thoughts of the dead who lie scattered around levels.
The Mea Culpa can be also powered up in various ways, with longer combos, more devastating lunges and various other explosive attacks all unlockable at hidden shrines. You can also add special hearts to your sword to embellish its power – however, quite cunningly, each of these comes with a negative effect. The Heart of the Holy Purge, for example, will increase the rate at which you attain Tears of Atonement at the cost of the use of your health flasks. There’s also a delightfully macabre set of collectable body parts to find throughout the world, with great names such the Cervical Vertebra of Zicher the Brewmaster or the Coxal of June the Prostitute, which can then be displayed in a (rather unsettling) underground chamber area.
Platforming is also uniformly precise, satisfying stuff which manages to avoid becoming an annoyance as there’s plenty of variety and death is almost always a result of your own mistake rather than the game being unfair. Stabbing your sword into rock faces and walls in order to make your way up mountainsides, timing your jumps through huge, slicing blades and traversing fiery pits and cauldrons filled with lava makes for some really tense sections, especially when you’re also trying to fend off some horrendous magic-shooting banshee or floating angel head at the same time.
Topping all of this off are a handful of truly memorable boss battles against ludicrously-named, screen-filling creations. Our Lady of the Charred Visage is a hideously deformed floating head with bullet-hell styled magic attacks, whilst Exposito, Scion of Abduration involves you dealing with the attacks of a severed head attached to a wooden worm whilst avoiding the clutches of a giant blindfolded infant, its face drenched in blood from its gouged-out eyes. None of these ghastly encounters outstay their welcome or come anywhere close to being as soul-crushingly difficult as those seen in a FromSoftware game, but they’re massively enjoyable affairs nonetheless, testing your skills and forcing you to utilise every trick at your disposal.
Once you’ve completed the Three Humiliations and opened the great door to the final area of the game – very much Blasphemous’ Anor Londo moment – you may think you’re almost done, but are instead blasted with a barrage of mini-bosses, main bosses and tricky mixes of enemy types – alongside some pretty exacting platform sections – on your way to the final encounter of the game, which took us somewhere in the region of 25 hours to reach.
The story here is a much more easy-to-follow affair than you may be expecting on the outset of things; Blasphemous wears its lore on its sleeves much more than a Souls game, although this too is a world filled with strange secrets, sad stories and bizarre characters to meet as you make your way to its dénouement.
Small complaints come in the form of a map which can’t be zoomed in or out, which means it’s sometimes a little bit of a pain to study in handheld mode, something which is exacerbated by the fact you’ll find yourself scouring it quite often later in the game to ascertain where you should be headed next. Indeed, the game does suffer a little from being overly obtuse as to how you should proceed at times. There are several points where you’ll need some to present some bizarre artefact or other to a certain NPC in order to further things along, and we found ourselves at a loss on several occasions as to how we should move forward. There’s also some very iffy voice-acting from a few of the characters you meet on your pilgrimage, although nothing nearly as bad as some of the merchants from Dark Souls, it has to be said.
In terms of this Switch version, everything runs at a silky smooth 1080p/60fp whilst docked, with that resolution dropping to 720p in handheld mode. Over the course of our time with Blasphemous, we encountered no hiccups or slowdown and it really does look absolutely stunning, especially in handheld mode, where its pixelated lines look that little bit smoother.
Posted by: xSicKxBot - 09-10-2019, 01:23 AM - Forum: Lounge
- No Replies
Xbox Live Was Down, But It's Back Up Again, You're Not Ever Gonna Keep It Down
Xbox Live services are currently suffering an outage. According to the Xbox Live Status page, those trying to connect will find they have limited to no access. The site states that core services such as signing in, as well as creating, managing, or recovering accounts are impacted. [Update: Xbox Live services are coming back online. Let's all celebrate by listening to Chumbawamba.]
The outage is happening across Xbox One, Xbox on Windows 10, Xbox 360, and Xbox on other devices--so, pretty much anything that can sign into services. Xbox Support on Twitter has acknowledged the issue.
Our teams are aware & currently investigating errors when attempting to sign in. We'll update here & on our status page: https://t.co/PzAdjUFMJj when we have more info to share.
The latest update on the status page states Microsoft's "engineers and developers are actively continuing to resolve the issue causing some members to have problems signing in to Xbox Live. Stay tuned, and thanks for your patience."
The outage will no doubt be frustrating to those who have early access to Gears 5, a core component of which is multiple multiplayer mode. Alongside the core campaign, which can be played co-operatively, there's the competitive multiplayer, Horde mode, and the new Escape mode. Naturally, there are many other games that rely on the Xbox Live network to function properly, most notably Fortnite.
Although Gears 5 is available to a select group of people now, it becomes widely available on September 10. In our Gears 5 review in progress, Phil Hornshaw said it "is very much a return of those best elements of Gears of War" but with "a focus on making the game feel somewhat more adaptive to your particular ways of playing."
He continued: "Whether you want campaign or co-op, Competitive or Quickplay, there's an option for you in Gears 5, and plenty of stuff to reward you for time spent and skill gained. Gears 5 might suffer from some of the same storytelling missteps as its predecessors, and it might not venture far out."
Teaching People to Share Technology: Adafruit Founder Limor Fried
This story is based on our interview with Adafruit founder Limor Fried
When Adafruit founder Limor Fried was studying electrical engineering and computer science at MIT, she realized she was less interested in the electrical engineering part.
“What I really liked to do was build stuff,” she said.
Instead of working on her homework or thesis, Fried spent her time designing hardware projects in her dorm. She built an MP3 player way before Apple made iPods popular.
“With electronics, you could build anything from an MP3 player to a GPS tracker,” she said.
Fried started building different gadgets, including LED light toys for the annual Burning Man creative festival. She published these projects on her website at MIT, including the CAD schematics, firmware and instructions on how to build them.
“It was kind of open source hardware, but at the time it wasn’t a thing yet. People would say, ‘Oh, no, you just published everything and gave it away,’” she recalled.
She started getting queries from around the world from people interested in building the devices she posted about, but they were having trouble sourcing the components.
“They needed actual hardware that I used in my projects. It was really difficult to get different components from different places,” Fried said. “You would have to order PCB [printed circuit board] from one place, resistors and chips from another place. It was really complicated for most people.”
Soon she started getting emails asking if she could sell a whole kit. Initially, she wasn’t interested, but she relented and began a small side business.
“I started selling a couple of kits, which I would ship from the local post office,” Fried said.
That small business eventually became her full-time job: Adafruit. In the last 13 years, the venture has grown from a few kits to over 4,000 products.
Adafruit offers what it calls “open source hardware,” designing and manufacturing innovative yet affordable electronics products, components, tools and accessories. When this hardware gets into the hands of creative people, they build some incredible things with it.
What Fried loves about hardware is that you can actually touch it, pick it up and show it off.
“You can take it out and wear it at Burning Man or cosplay conventions,” she said.
In addition to being fun and creative, Adafruit’s hardware also helps people. In the last couple of years, Adafruit has been working on assistive technologies, developing adaptive and rehabilitative devices to assist people with disabilities.
“It changes their lives,” Fried said.
These types of devices are a great option for people because you can do only so much with proprietary technologies. Off-the-shelf devices are difficult to customize, and hiring someone to build just what you need could be very expensive and out of reach for most people.
“Open source hardware is a perfect middle ground. It’s inexpensive and allows you to customize the way you need it,” Fried said. “The code is there. Instructions are there. Anyone can do it. Since it’s open source, people can iterate, tweak, fine-tune to their needs. We are seeing a lot of interest in open source hardware for assistive technologies.”
Adafruit’s hardware is working for everyone from creative hobbyists to people interested in building things for their smartphones to developers inventing products for the next industrial revolution. Adafruit also worked with computer game company Nvidia to help build its Jetson Nano Developer Kit, which lets users run multiple neural networks for artificial intelligence, machine learning and edge computing.
Adafruit also sends its kits to schools to facilitate STEM programs, as kids tend to respond well to learning with physical objects. A project that started as just a fun activity for Fried now has a real purpose.
“I think the mission is to teach people to share technology and show people how much fun and exciting and creative it can be,” she said.
Unreal Engine Free Marketplace Assets September 2019
Every month Epic Games release several free assets on the Unreal Engine marketplace and this September is no exception. Keep in mind you need to “purchase” the assets during the month of September for free then you can keep them forever. Additionally Epic make a couple free assets available forever each month.
September Free Assets
Free Forever Assets
You can learn more about the asset giveaway on the Unreal Engine blog or by watching the video below.
So I’ve been trying to dabble in some more mobile games this past week – I downloaded Gears Pop! Just to see what it was like (gacha, but not terrible) and Fallout Shelter again because I remember having fun with it when it first launched. Now I’m testing out Pokemon Masters because we’ll be doing some guide work for it over the next week or two. Interest around Harry Potter: Wizards Unite seems to have died off quite quickly so i’ll be interested to see how long this new pan flashes for.
It’s not been a great week as far as premium games go – all our favourites continue to get plenty of updates, and we decided to look back on games with some excellent expansion content. Hope you enjoyed that.
We’ve been mentioning this one for a while – now the collect’em-all 3v3 battler is out in the wild. It’s not quite as noble as Pokemon GO – you’re not being incentivised to go out-and-about or anything like that, this is more of your bog-standard ‘gatcha’ game dressed in a Pokemon skin. If you’ve not yet read up on it, this is essentially a game about collecting and levelling up ‘Sync Pairs’ – a pairing of a trainer (pulled from the Pokeverse) and a Pokemon.
The F2P aspects mainly revolve around ‘Scouting’ where you spend gems to try and pull rare combinations to help fight in the game’s story mode. Unlike a lot of gacha games this is wholly a PvE affair, with Co-Op available once you’ve cleared Chapter 10. I’ve been dabbling around with it and it’s not bad as games go – the battles still retain some of the tactical dimensions you get from the main games. Your mileage will vary depending on how much you care about Pokemon and, more specifically, specific iconic characters from the TV Shows.
Not so much this week but we missed a couple of popular indie releases that aren’t exactly in our usual wheelhouse:
Dead Cells is a popular action/platformer released last year on PC that’s crossed over to iOS.
If you remember the interactive visual novel experience Her Story, you might be interested to know that the spiritual sequel, Telling Lies, has also just released onto iOS.
Upcoming Games
A couple of announcements we didn’t get a chance to write-up yet you might be interested in knowing about:
Nintendo has finally given us a solid release date for Mario Kart Tour, the rumoured Mario Kart mobile game that was announced at the start of 2018. Like most Nintendo experimentations on mobile, it looks like it’s going to be a F2P experience, but you’ll be able to make up your own mind about it come September 25th.
Also, it’s that time of the year again when we have the latest version of Football Manager to look forward to. Football Manager 2020 Mobile and Football Manager 2020 Touch are due to release at the same time as the main PC version of the game in November. No real information as to what the improvements will be over the 2019 version, but I’m sure it won’t be long before we find out.
Also don’t forget that Tropico’s Android version will be released next week on September 5th.
Updates
Not much to report in terms of major game updates. The big Star Traders: Frontiers content drop we talked about at the start of the week is now live on mobile, if you were waiting for that.
Plus the Auto Chess games continue to further improve themselves. Dota Underlords, for example did some tweaking last Friday which you can read up on here. We’re going to be running some more Underlords content at the start of next week, so watch out for that.
Sales
Seems Google Play and the Apple App Store hate mobile games this week, as there’s not really anything worth doing a full write-up on. The only two things worth highlighting are:
All of the Reigns games are on sale on iOS and Android.
Team17 have discounted their entire mobile catalogue on iOS and Android.
Seen anything else you liked? Played any of the above? Let us know in the comments!
Note: .NET Core 3.0 Preview 7 requires Visual Studio 2019 16.3 Preview 1, which is being released later this week.
To install the latest client-side Blazor templates also run the following command:
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview7.19365.7
Installing the Blazor Visual Studio extension is no longer required and it can be uninstalled if you’ve installed a previous version. Installing the Blazor WebAssembly templates from the command-line is now all you need to do to get them to show up in Visual Studio.
Please also see the full list of breaking changes in ASP.NET Core 3.0.
To upgrade an existing ASP.NET Core 3.0 Preview 6 project to Preview 7:
Update Microsoft.AspNetCore.* package references to 3.0.0-preview7.19365.7.
That’s it! You should be ready to go.
Latest Visual Studio preview includes .NET Core 3.0 as the default runtime
The latest preview update for Visual Studio (16.3) includes .NET Core 3.0 as the default .NET Core runtime version. This means that if you install the latest preview of Visual Studio then you already have .NET Core 3.0. New project by default will target .NET Core 3.0
Top level ASP.NET Core templates in Visual Studio
The ASP.NET Core templates now show up as top level templates in Visual Studio in the “Create a new project” dialog.
This means you can now search for the various ASP.NET Core templates and filter by project type (web, service, library, etc.) to find the one you want to use.
Simplified web templates
We’ve taken some steps to further simplify the web app templates to reduce the amount of code that is frequently just removed.
Specifically:
The cookie consent UI is no longer included in the web app templates by default.
Scripts and related static assets are now referenced as local files instead of using CDNs based on the current environment.
We will provide samples and documentation for adding these features to new apps as needed.
Attribute splatting for components
Components can now capture and render additional attributes in addition to the component’s declared parameters. Additional attributes can be captured in a dictionary and then “splatted” onto an element as part of the component’s rendering using the new @attributes Razor directive. This feature is especially valuable when defining a component that produces a markup element that supports a variety of customizations. For instance if you were defining a component that produces an <input> element, it would be tedious to define all of the attributes <input> supports like maxlength or placeholder as component parameters.
Accepting arbitrary parameters
To define a component that accepts arbitrary attributes define a component parameter using the [Parameter] attribute with the CaptureUnmatchedAttributes property set to true. The type of the parameter must be assignable from Dictionary<string, object>. This means that IEnumerable<KeyValuePair<string, object>> or IReadOnlyDictionary<string, object> are also options.
The CaptureUnmatchedAttributes property on [Parameter] allows that parameter to match all attributes that do not match any other parameter. A component can only define a single parameter with CaptureUnmatchedAttributes.
Using @attributes to render arbitrary attributes
A component can pass arbitrary attributes to another component or markup element using the @attributes directive attribute. The @attributes directive allows you to specify a collection of attributes to pass to a markup element or component. This is valuable because the set of key-value-pairs specified as attributes can come from a .NET collection and do not need to be specified in the source code of the component.
Using the @attributes directive the contents of the Attribute property get “splatted” onto the input element. If this results in duplicate attributes, then evaluation of attributes occurs from left to right. In the above example if Attributes also contained a value for class it would supersede class="form-field". If Attributes contained a value for type then that would be superseded by type="text".
Data binding support for TypeConverters and generics
Blazor now supports data binding to types that have a string TypeConverter. Many built-in framework types, like Guid and TimeSpan have a string TypeConverter, or you can define custom types with a string TypeConverter yourself. These types now work seamlessly with data binding:
Data binding also now works great with generics. In generic components you can now bind to types specified using generic type parameters.
@typeparam T <input @bind="value" /> <p>@value</p> @code { T value;
}
Clarified which directive attributes expect HTML vs C
In Preview 6 we introduced directive attributes as a common syntax for Razor compiler related features like specifying event handlers (@onclick) and data binding (@bind). In this update we’ve cleaned up which of the built-in directive attributes expect C# and HTML. Specifically, event handlers now expect C# values so a leading @ character is no longer required when specifying the event handler value:
@* Before *@
<button @onclick="@OnClick">Click me</button> @* After *@
<button @onclick="OnClick">Click me</button>
EventCounters
In place of Windows perf counters, .NET Core introduced a new way of emitting metrics via EventCounters. In preview7, we now emit EventCounters ASP.NET Core. You can use the dotnet counters global tool to view the metrics we emit.
Install the latest preview of dotnet counters by running the following command:
The Hosting EventSourceProvider (Microsoft.AspNetCore.Hosting) now emits the following request counters:
requests-per-second
total-requests
current-requests
failed-requests
SignalR
In addition to hosting, SignalR (Microsoft.AspNetCore.Http.Connections) also emits the following connection counters:
connections-started
connections-stopped
connections-timed-out
connections-duration
To view all the counters emitted by ASP.NET Core, you can start dotnet counters and specify the desired provider. The example below shows the output when subscribing to events emitted by the Microsoft.AspNetCore.Hosting and System.Runtime providers.
New Package ID for SignalR’s JavaScript Client in NPM
The Azure SignalR Service made it easier for non-.NET developers to make use of SignalR’s real-time capabilities. A frequent question we would get from potential customers who wanted to enable their applications with SignalR via the Azure SignalR Service was “does it only work with ASP.NET?” The former identity of the ASP.NET Core SignalR – which included the @aspnet organization on NPM, only further confused new SignalR users.
To mitigate this confusion, beginning with 3.0.0-preview7, the SignalR JavaScript client will change from being @aspnet/signalr to @microsoft/signalr. To react to this change, you will need to change your references in package.json files, require statements, and ECMAScript import statements. If you’re interested in providing feedback on this move or to learn the thought process the team went through to make the change, read and/or contribute to this GitHub issue where the team engaged in an open discussion with the community.
New Customizable SignalR Hub Method Authorization
With Preview 7, SignalR now provides a custom resource to authorization handlers when a hub method requires authorization. The resource is an instance of HubInvocationContext. The HubInvocationContext includes the HubCallerContext, the name of the hub method being invoked, and the arguments to the hub method.
Consider the example of a chat room allowing multiple organization sign-in via Azure Active Directory. Anyone with a Microsoft account can sign in to chat, but only members of the owning organization should be able to ban users or view users’ chat histories. Furthermore, we might want to restrict certain functionality from certain users. Using the updated features in Preview 7, this is entirely possible. Note how the DomainRestrictedRequirement serves as a custom IAuthorizationRequirement. Now that the HubInvocationContext resource parameter is being passed in, the internal logic can inspect the context in which the Hub is being called and make decisions on allowing the user to execute individual Hub methods.
Now, individual Hub methods can be decorated with the name of the policy the code will need to check at run-time. As clients attempt to call individual Hub methods, the DomainRestrictedRequirement handler will run and control access to the methods. Based on the way the DomainRestrictedRequirement controls access, all logged-in users should be able to call the SendMessage method, only users who’ve logged in with a @jabbr.net email address will be able to view users’ histories, and – with the exception of bob42@jabbr.net – will be able to ban users from the chat room.
[Authorize]
public class ChatHub : Hub
{ public void SendMessage(string message) { } [Authorize("DomainRestricted")] public void BanUser(string username) { } [Authorize("DomainRestricted")] public void ViewUserHistory(string username) { }
}
Creating the DomainRestricted policy is as simple as wiring it up using the authorization middleware. In Startup.cs, add the new policy, providing the custom DomainRestrictedRequirement requirement as a parameter.
It must be noted that in this example, the DomainRestrictedRequirement class is not only a IAuthorizationRequirement but also it’s own AuthorizationHandler for that requirement. It is fine to split these into separate classes to separate concerns. Yet, in this way, there’s no need to inject the AuthorizationHandler during Startup, since the requirement and the handler are the same thing, there’s no need to inject the handler separately.
HTTPS in gRPC templates
The gRPC templates have been now been updated to use HTTPS by default. At development time, we continue the same certificate generated by the dotnet dev-certs tool and during production, you will still need to supply your own certificate.
gRPC Client Improvements
The managed gRPC client (Grpc.Net.Client) has been updated to target .NET Standard 2.1 and no longer depends on types present only in .NET Core 3.0. This potentially gives us the ability to run on other platforms in the future.
gRPC Metapackage
In 3.0.0-preview7, we’ve introduced a new package Grpc.AspNetCore that transitively references all other runtime and tooling dependencies required for building gRPC projects. Reasoning about a single package version for the metapackage should make it easier for developers to deal with as opposed multiple dependencies that version independently.
CLI tool for managing gRPC code generation
The new dotnet-grpc global tool makes it easier to manage protobuf files and their code generation settings. The global tool manages adding and removing protobuf files as well adding the required package references required to build and run gRPC applications.
Install the latest preview of dotnet-grpc by running the following command:
As an example, you can run following commands to generate a protobuf file and add it to your project for code generation. If you attempt this on a non-web project, we will default to generating a client and add the required package dependencies.
dotnet new proto -o .\Protos\mailbox.proto
dotnet grpc add-file .\Protos\mailbox.proto
Give feedback
We hope you enjoy the new features in this preview release of ASP.NET Core and Blazor! Please let us know what you think by filing issues on GitHub.
HomeKit-compatible Intellithings RoomMe presence sensor now available
By Andrew O’Hara Tuesday, September 03, 2019, 07:00 am PT (10:00 am ET)
Intellithings has announced availability and HomeKit support for its RoomMe smart home presence device that helps improve the automation of connected devices.
RoomMe presence sensor works with HomeKit
Currently, with HomeKit, lights can be triggered by motion which could include pets or other inadvertent triggers. RoomMe can identify people and make adjustments based on who that person is.
The RoomMe system identifies the specific user by spotting the app on a carried smartphone. A mounted Personal Location Sensor —or PLS —does the identification and executes personalized room-level scenes incorporating lighting, temperature, entertainment, and more.
RoomMe integrates not only with HomeKit devices, but Wink and Sensibo bringing together hundreds of Z-Wave and Zigbee devices.
RoomMe app for creating automation rules
“Sensors make the difference between a home that just has a few smart devices installed and a true smart home. Sensors, by name, sense what is happening,” said Oren Kotlicki, founder and CEO at Intellithings. “With RoomMe, we take that idea a step further: This is not a sensor that is triggered by a pet to turn on a light, but a personal location sensor that knows who is in the room and what that person wants the room to do, automatically.”
As an example, when a user enters the living at night, it could close the blinds, lower the lights, set the thermostat to their desired temperature, warm the light’s color, turn on the TV to a user’s preferred input, and adjust the volume. Each of those variables can be unique to each person.
Intellithings won a 2019 Innovation Design Honoree award earlier this year at CES for the RoomMe PLS.
The RoomMe PLS is available as a starter kit for $129 and includes two RoomMe sensors as well as access to the smartphone app. It is available for order now on Amazon.
In a previous post, we looked at what RPM packages are. They are archives that contain files and metadata. This metadata tells RPM where to create or remove files from when an RPM is installed or uninstalled. The metadata also contains information on “dependencies”, which you will remember from the previous post, can either be “runtime” or “build time”.
As an example, we will look at fpaste. You can download the RPM using dnf. This will download the latest version of fpaste that is available in the Fedora repositories. On Fedora 30, this is currently 0.3.9.2:
The next link in the chain is the source RPM. All software in Fedora must be built from its source code. We do not include pre-built binaries. So, for an RPM file to be made, RPM (the tool) needs to be:
given the files that have to be installed,
told how to generate these files, if they are to be compiled, for example,
told where these files must be installed,
what other dependencies this particular software needs to work properly.
The source RPM holds all of this information. Source RPMs are similar archives to RPM, but as the name suggests, instead of holding the built binary files, they contain the source files for a piece of software. Let’s download the source RPM for fpaste:
Notice how the file ends with “src.rpm”. All RPMs are built from source RPMs. You can easily check what source RPM a “binary” RPM comes from using dnf too:
Also, since this is the source RPM, it does not contain built files. Instead, it contains the sources and instructions on how to build the RPM from them:
Here, the first file is simply the source code for fpaste. The second is the “spec” file. The spec file is the recipe that tells RPM (the tool) how to create the RPM (the archive) using the sources contained in the source RPM—all the information that RPM (the tool) needs to build RPMs (the archives) are contained in spec files. When we package maintainers add software to Fedora, most of our time is spent writing and perfecting the individual spec files. When a software package needs an update, we go back and tweak the spec file. You can see the spec files for ALL packages in Fedora at our source repository at https://src.fedoraproject.org/browse/projects/
Note that one source RPM may contain the instructions to build multiple RPMs. fpaste is a very simple piece of software, where one source RPM generates one “binary” RPM. Python, on the other hand is more complex. While there is only one source RPM, it generates multiple binary RPMs:
In RPM jargon, “python3” is the “main package”, and so the spec file will be called “python3.spec”. All the other packages are “sub-packages”. You can download the source RPM for python3 and see what’s in it too. (Hint: patches are also part of the source code):
Now that we have the source RPM, and know what’s in it, we can rebuild our RPM from it. Before we do so, though, we should set our system up to build RPMs. First, we install the required tools:
$ sudo dnf install fedora-packager
This will install the rpmbuild tool. rpmbuild requires a default layout so that it knows where each required component of the source rpm is. Let’s see what they are:
# Where should the spec file go?
$ rpm -E %{_specdir}
/home/asinha/rpmbuild/SPECS # Where should the sources go?
$ rpm -E %{_sourcedir}
/home/asinha/rpmbuild/SOURCES # Where is temporary build directory?
$ rpm -E %{_builddir}
/home/asinha/rpmbuild/BUILD # Where is the buildroot?
$ rpm -E %{_buildrootdir}
/home/asinha/rpmbuild/BUILDROOT # Where will the source rpms be?
$ rpm -E %{_srcrpmdir}
/home/asinha/rpmbuild/SRPMS # Where will the built rpms be?
$ rpm -E %{_rpmdir}
/home/asinha/rpmbuild/RPMS
RPM provides a tool that sets it all up for you too:
$ rpmdev-setuptree
Then we ensure that we have all the build dependencies for fpaste installed:
sudo dnf builddep fpaste-0.3.9.2-3.fc30.src.rpm
For fpaste you only need Python and that must already be installed on your system (dnf uses Python too). The builddep command can also be given a spec file instead of an source RPM. Read more in the man page:
$ man dnf.plugin.builddep
Now that we have all that we need, building an RPM from a source RPM is as simple as:
rpmbuild will install the source RPM and build your RPM from it. You can now install the RPM to use it as you do–using dnf. Of course, as said before, if you want to change anything in the RPM, you must modify the spec file—we’ll cover spec files in next post.
Summary
To summarise this post in two short points:
the RPMs we generally install to use software are “binary” RPMs that contain built versions of the software
these are built from source RPMs that include the source code and the spec file that are needed to generate the binary RPMs.