5 ms·
Wow, I read that article and it just made me cringe every step of the way. What could have been: # imgadm install image-uuid # vmadm create -f vm.json [1
by Annatar 10y ago
Wow, I read that article and it just made me cringe every step of the way.
What could have been:
# imgadm install image-uuid
# vmadm create -f vm.json
[1][2]
...instead is a whole bunch of hacking on a whole bunch of things... One would think that with as much as SmartOS has been discussed here on Hacker News, people would finally realize there is something simpler out there without all this pain, but apparently not. Crazy!
[1] https://wiki.smartos.org/display/DOC/Managing+Images#ManagingImages-ImportingImagesLocally https://wiki.smartos.org/display/DOC/Managing+Images#Managin...
[2] https://wiki.smartos.org/display/DOC/Using+vmadm+to+manage+virtual+machines#Usingvmadmtomanagevirtualmachines-CreatinganewVM https://wiki.smartos.org/display/DOC/Using+vmadm+to+manage+v...
- icebraining 10y agoWhich parts of the article do those two commands replace?
- Annatar 10y agoPretty much all of them, including the database setup.
- icebraining 10y agoClearly those two commands can't by themselves know how to set up a database; I'm assuming it's in the JSON file, but then not showing it is somewhat misleading. It would certainly not look as clean if you were to include a big "echo ... > vm.json". Also, the database setup is only the first part, it then goes on to show container linking and etc.
- Annatar 10y agoWith SmartOS, the database image can be preconfigured and published into the catalog, so when the image is pulled down with imgadm(1M), the database is already ready to take data and serve. The complex startup he then continues to hack on is superfluous on SmartOS, as SmartOS has the service management facility for that. For brand new services, one XML file and svcadm import later, the thing is ready to be turned into an image, never to have to be revisited again. I do not understand why people take the harder way to do the same thing (if there is no clear advantage to doing it the harder way). He picked MySQL, a database which is infamous for data corruption and bugs where basic SQL functionality does not work; the substrate, Ubuntu, provides no fault management architecture, no end-to-end data integrity, no post mortem kernel debugging and dynamic tracing facilities, which will eventually result in incidents in the dead of the night. Then there is the choice of Docker, which is really not designed to run a fully functional virtual server, but a single process in a single image (although it can run something akin to a virtual server, with lots and lots of extra system engineering put in). Why choose Docker, when with zones on SmartOS one can have a fully isolated, fully functional UNIX virtual server, but running at the speed of bare metal, and all of that in a single invocation of vmadm -f vm_definition.json (or use the SDC software, which puts a GUI on top of it all)? If something more reliable and easier is available, why insist on doing it the harder way with an unreliable substrate? There appears to be no logic here, and if there is any, it escapes me. Is it lack of awareness of SmartOS, FMA, SMF, ZFS, and zones, or something else?
- icebraining 10y agoWith SmartOS, the database image can be preconfigured and published into the catalog, so when the image is pulled down with imgadm(1M), the database is already ready to take data and serve. So can with Docker. The author simply chose to use a pre-built image instead. The complex startup he then continues to hack on is superfluous on SmartOS, as SmartOS has the service management facility for that. For brand new services, one XML file and svcadm import later, the thing is ready to be turned into an image, never to have to be revisited again. In Docker that's called a Dockerfile. It does exactly what you describe. Again, the author simply didn't do that. He picked MySQL [and] Ubuntu It's an example, does it really matter? Maybe the author is simply more familiar with it. Why choose Docker, when with zones on SmartOS one can have a fully isolated, fully functional UNIX virtual server, but running at the speed of bare metal The fully functional containers you've described have been available for Linux for years before SmartOS was first released, first as OpenVZ and then as LXC. Docker's approach is not a technical limitation, it's a deployment philosophy. They don't want fully functional UNIX servers, they want disposable stateless containers that can killed off and cloned. If something more reliable and easier is available, why insist on doing it the harder way with an unreliable substrate? There appears to be no logic here, and if there is any, it escapes me. Is it lack of awareness of SmartOS, FMA, SMF, ZFS, and zones, or something else? I suggest you then read up on Docker and the motivations behind its creation and popularity before suggesting that everyone in the thread is illogical and ignorant, because - and I say this as someone who doesn't really like Docker - your advocacy for SmartOS has a vibe of the infomercial from Family Guy: https://www.youtube.com/watch?v=5ysMt_9JnyI https://www.youtube.com/watch?v=5ysMt_9JnyI
- Annatar 10y ago> In Docker that's called a Dockerfile. It does exactly what you describe. Actually it does not, as SMF is part of the fault management architecture, which is part of the Solaris self-healing technology: unlike the Docker file, SMF will watch over services and restart them if necessary, if configuration files are specified as dependencies and they change, SMF will call the service's refresh method. Docker is just a delivery mechanism, whereas SMF is part of something bigger and far more powerful. SMF ties into FMA, which actually watches over not just software, but hardware down to the individual chips in the memory slots (when not running on virtual hardware). Even on zones, SMF provides the benefit of uniform diagnostics. Docker isn't designed for any of that, which is why he had to hack on the microservice setup. > fmadm Usage: fmadm [-P prog] [-q] [cmd [args ... ]] fmadm config - display fault manager configuration fmadm faulty [-afgiprsv] [-u <uuid>] [-n <max_fault>] - display list of faulty resources fmadm flush <fmri> ... - flush cached state for resource fmadm load <path> - load specified fault manager module fmadm repaired <fmri>|label> - notify fault manager that resource has been repaired fmadm acquit <fmri> [<uuid>] | label [<uuid>] | <uuid> - acquit resource or acquit case fmadm replaced <fmri>|label - notify fault manager that resource has been replaced fmadm reset [-s serd] <module> - reset module or sub-component fmadm rotate <logname> - rotate log file fmadm unload <module> - unload specified fault manager module That up there is science fiction in Docker. As is something like this: > svcs -xv bacula svc:/site/bacula:sd (Bacula storage daemon) State: online since Sat Apr 23 06:54:00 2016 See: man -M /opt/abcd/share/man -s 1M bacula-sd See: /var/svc/log/site-bacula:sd.log Impact: None. svc:/site/bacula:fd (Bacula file daemon configuration) State: online since Sat Apr 23 06:54:00 2016 See: man -M /opt/abcd/share/man -s 1M bacula-fd See: /var/svc/log/site-bacula:fd.log Impact: None. svc:/site/bacula:dir (Bacula host specific configuration) State: online since Sat Apr 23 06:54:00 2016 See: man -M /opt/abcd/share/man -s 1M bacula-dir See: /var/svc/log/site-bacula:dir.log Impact: None. > The fully functional containers you've described have been available for Linux for years before SmartOS was first released, first as OpenVZ and then as LXC. Actually no, since the "containers" are zones in SmartOS, and I've been using zones since 2006, when they first came out in Solaris 10 update 2. This was before OpenVZ and LXC. Zones gave me virtual UNIX servers. Solaris containers gave me caps on those servers. Both came in one package back in 2006. SmartOS, being a freeware open source Solaris derivative leverages all that technology, plus a whole bunch more which neither Solaris nor GNU/Linux nor Docker have. Designed for exactly what the author of the original article was trying to hack up together, minus all the hacking.
- justinsaccount 10y agoSmartos is neat. I run smartos at home. Let me tell you, you are not doing smartos any favors. People don't give a shit about how great you think smartos is. "smartos can do this", "smartos can do that". blah blah blah. Do you know what the difference is between the posted link and your comments? The stuff in the article actually works, while your "look how simple it is" comment, does not: [root@srv2 ~]# uname -a SunOS srv2 5.11 joyent_20160504T205801Z i86pc i386 i86pc [root@srv2 ~]# imgadm install image-uuid imgadm install: error (Usage): unexpected args (1): "image-uuid" [root@srv2 ~]# vmadm create -f vm.json File: vm.json does not exist. Compared to the process outlined in the article that works, and shows you how to setup the entire process to, build, rebuild, and run two separate containers. Their first command is basically $ docker run -it --rm ubuntu root@37ffd019060f:/# Which anyone with docker installed can run. Your first command returns an error message. And then you go on to say > With SmartOS, the database image can be preconfigured and published into the catalog > one XML file and svcadm import later, the thing is ready to be turned into an image, never to have to be revisited again > a single invocation of vmadm -f vm_definition.json So all you have to do is preconfigure things (how?), publish them into the catalog (whatever that is) and write both an xml and a json file (contents unknown) to start your service. If you actually cared about getting people interested in smartos, you would write a "learn-smartos-by-building-a-microservice" article and show how to actually use the fucking thing instead of ranting how terrible docker is.
- Annatar 10y ago> Do you know what the difference is between the posted link and your comments? The stuff in the article actually works, while your "look how simple it is" comment, does not: The usage I provided is a SYNOPSIS, as in synopsis from a manual page. You will note that mine is a comment, not an entire blog article (I do not have a blog). The intent behind my comment is to provide a pointer to further exploration; it is not a how to document, but rather a starting point for those who are actually willing and able to sit down and read some documentation, which is in the links I provided, and will provide the equivalent of what the author's article does, and dividends on top of that. (Less incidents in the dead of the night equals long term dividends.) My intent was that someone will read it and go off to explore it. That is not to say that I do not agree with your point, as I myself am a firm believer in examples which work. However, one must at some point have the experience to distinguish between a synopsis and a guide. A lone comment on Hacker News is not the place for an entire how to guide. > Which anyone with docker installed can run. Yes, but as with anything, there will be long term consequences: while anyone can get it up and running easily, when it comes time to put it in production, and the thing busts because there is no lifecycle management, no change management, no configuration management (sorry: dumping a bunch of files into a Docker "image" definition doesn't even come close to lifecycle management, or capability maturity model level 2[1]), no post mortem debugging facilities, no end-to-end data integrity, and performance penalty for running inside of a fully virtualized VM, the problems will start. For example, MySQL was also "easy to set up", but that didn't change the fact that the software does not work correctly[2] and that MySQL deployments later caused many organizations many problems. Just because something is easy to set up does not mean it is a good solution to deploy. Nowadays people are realizing that and migrating to PostgreSQL because that software does work correctly, but all that time, effort and money spent because of how "easy" MySQL was to get going could have been prevented in the first place. With Docker and how it is designed, and based on what I know, I can see the same types of problems which will inevitably lead to outages. And in the interest of disclosure, what is it to me? Well, argumentum ad populum is extremely spread these days, which means that lots of jobs would (and have) started springing up with Docker, which means I would be forced to work with what I know from experience is inferior technology. Since I see the problems of Docker, that means I would not be able to sleep through the night, and spend my nights in conference calls with clueless managers demanding that I fix it. I do not want that; I want to sleep through my nights, and work with slick and reliable technology like SmartOS, not a toy like Docker causing me problems down the road, and just because it was popular. You are making an indirect argumentum ad populum, which is never a good thing. > If you actually cared about getting people interested in smartos, you would write a "learn-smartos-by-building-a-microservice" article and show how to actually use the fucking thing instead of ranting how terrible docker is. If you had bothered to read the documentation in the links, you would have a pretty good idea on "how the fucking thing works", and how to build a microservice; I am sorry if you think that clicking on the links and reading through the articles is too much overhead. How is it then, that reading through that Docker article isn't overhead, and you had no problem clicking at that? [1] https://en.wikipedia.org/wiki/Capability_Maturity_Model#Levels https://en.wikipedia.org/wiki/Capability_Maturity_Model#Leve... [2] https://www.youtube.com/watch?v=emgJtr9tIME https://www.youtube.com/watch?v=emgJtr9tIME