CHOCOLATE OR AN INDIAN DRINK By the use and moderate use were of, health is preserved, sickness diverted and cured, especially the plague of the guts, vulgarily called the new disease, fluxes, consumptions and coughs of the lungs, with sundry and other diseases. By it also, conception is caused, the birth hastened and facilitated, beauty gained and continued. Written originally in Spanish by Antonio Comanero. Translated by Captain James Wadsworth. II. The Gentry of the English Nation Sirs, the ensuing tract, I many years since translated out of the original Spanish and dedicated to the right honourable Edward Lord Conway, etc., by whose noble patronage the confectionware of it treats, together with itself, were first admitted into the English court, where they received the appropriation of the most noble and judicious those days afforded, since which time it has been universally sought for and thirsted after by people of all degrees, especially those of the female sex, either for the pleasure therein naturally residing, to cure and divert diseases, or else to supply some defects of nature, wherein it challenges a special prerogative above all other medicines whatsoever. The author thereof was one Antonio Comanero of Lidzma, who sometimes lived in the West Indies where it is very much used and held in great esteem until this day, as also in Spain, Italy, and Flanders, and admired by the most learned doctors of all those nations. As for the name, chocolate, it is an Indian word, compounded of eight, as some say, or as others, atle, which in the Mexican language signifyeth water and cocoa, the noise that the water wherein the chocolate is put, maketh when it is stirred in a cup, until it bubble and rise unto a froth, and may be called in English a compounded or confectioned drink. The confection itself consists of several ingredients according to the different constitutions of those that use it. The principle of which is called cacao, a kind of nut or kernel, bigger than a great almond, which grows upon a tree called the tree of cacao, containing in it the quality of the four elements, as will appear in the following discourse. The virtues thereof are no less various than admirable, for, besides that it preserves health, and makes, such as drinks it, often fat and corpulent, fair and amiable, it vehemently incites to venus, and causes conception in women, hastens and facilitates their delivery. It is an excellent help to digestion. It cures consumptions in the cough of the lungs, the new disease or plague of the guts, and other fluxes, the green sickness, jaundice, and all manner of inflammations, opalations and obstructions. It quite takes away the morphu, cleanses the teeth, and sweeteneth the breath, provokes urine, cures the stone and stangury, expels poison, and preserves from all infectious diseases. But I shall not assume to enumerate all the virtues of this confection, for that were impossible, every day producing new and admirable effects in such as drink it. I shall rather refer to the testimony of those noble personages, who are known constantly to use and receive constant and manifold benefits by it, having thereby no other aim than the general good of this commonwealth, were of, I am a faithful member, and to be esteemed as I really am, gentlemen, your affectionate friend to love and serve you, Don Diego de Vatisforte, Westminster, December 20th, 1651. The translator to every individual man and woman, learned or unlearned, honest or dishonest, in the due praise of divine chocolate. Doctors lay by your irksome books, and all ye petty-fogging rooks, leave quacking and enuncle it, the virtues of a chocolate.  Dead-body baths be used no more, nor smoky stoves, but by the whore of Babylon since happy fate has blessed us with chocolate. Let old punctius grease in his shoes with his mock-ball-sum and abuse, no more the world but meditate the excellence of chocolate. The Dr. Trigg, who so excels no longer trudge to westward wells, for though that water expurgate, to sput the dredges of chocolate. Let all the Parcellinian crew, who can extract Christian from Jew, or out of monarchy estate, break all their stills for chocolate. Tell us no more of weapon-sav, but rather doom us to a grave. For sure our wounds will ulcerate, unless they're washed with chocolate. The thriving saint, who will not come, within a sack-shop's bousing roam, his spirit to exhilarate, drinks bowls at home of chocolate. His spouse, when she, brimful of scents, doth want her dubon-evilance, and babes of grace would propagate, is always sipping chocolate. The roaring crew of gallant ones, whose marrow wroughts within their bones, their bodies quickly regulate, if once but soost, in chocolate. Young heirs that have more land than wit, when once they do, but taste of it, will rather span their whole estate, than weaned be from chocolate. The nut-brown lasses of the land, whom nature veiled in face and hand, are quickly beauties of high rate, by one small draft of chocolate. Besides it saves the moneys lost, each day in patches, which did cost. Them dear until of late, they found this heavenly chocolate. Nor need the woman, longer grieve, who spend their oil, yet not conceive. For tis a help immediate, if such but lick of chocolate. Consumptions to be well assured, are no less soon, than soundly cured, accepting such as dough relate, unto the purse, by chocolate. Nay more its virtue is so much, that if a lady get a touch, her grief it will extenuate, if she but smell of chocolate. The feeble man, whom nature ties, to do his mistresses, drudgeries, oh how it will his mind elate, if she allow him chocolate. Real makled women, young and fresh, create new motions of the flesh, and cause them long, for you know what, if they but taste of chocolate. There's near a common councilman, whose life would reach unto a span. Should he not well affect the state, and first and last drink chocolate. Nor ere a citizen's chaste wife, that ever shall prolong her life, while stopen stands her prosteren gait, unless she drink of chocolate. Nor does the levite any harm, it keepeth his devotion warm, and eat the hair upon his pate, so long as he drinks chocolate. Both high and low, both rich and poor, my lord, my lady, and his, with all the folks at Billingsgate, bow, bow, your hams, to chocolate. To the author Great Don, Grandie of Spain, Ilostricimal of Venice, High and Mighty King of Candy, Great Banshaw of Babylon, Prince of the Moon, Lord of the Seven Stars, Governor of the Castle of Comfort, sole admiral of the Floating Caravan, author of the European Mercury, Chief General and admiral of the Invisible Fleet and Army of Tera Incognita, Captain James Wadsworth. The Allowance of Melchor Delora, Physician General for the Kingdom of Spain. I, Dr. Melchor Delora, Physician General for the Kingdom of Spain, at the command of Don John de Valesco and Asabido, Vicar General of Madrid, have seen this treatise of chocolate, composed by Antonio Culmenero of Lidzma, which is very learned and curious, and therefore it ought to be licensed for the press. It containing nothing contrary to good manners, and cannot be but very pleasing to those who were affected to chocolate. In testimony thereof I have subscribed my name in Madrid the 23rd day of August 1631, Melchor Delora. The Testimonial of John de Mina, Doctor and Physician to the King of Spain. I, John de Mina, Physician to His Majesty, and one of the Council General of the Inquisition, have seen this treatise of chocolate composed by Dr. Antonio Culmenero of Lidzma, by command of the Supreme Royal Court of Justice, which containeth nothing contrary to good manners, and the subject is very learnedly handled, and with great judgment and no doubt, but it will give much pleasure and content to all those who are affected to chocolate, and therefore may be printed, and in confirmation of this truth I have hitherto subscribed my name the 17th of September 1631. John de Mina, Doctor in Physique to the Reader. The number is so great of those who in these times drink chocolate, that not only in the Indies, where this kind of drink hath its original, but it is also much used in Spain, Italy and Flanders, and particularly at the Cure, and many do speak diversely of it according to the benefit or hurt they receive from it, some saying that it is stopping others, and those the greater part, that it makes one fat, others that the use of it strengthens the stomach, others that it heats and burns them, and others say that although they take it every hour, and in the dog-days, yet they find themselves well with it, and therefore my desire is to take this pains for the pleasure and profit of the public, endeavouring to accommodate it to the content of all, according to the variety of those things wherewith it may be mixed, so that every man may make choice of that, which shall be most agreeable to his disposition. I have not seen any who have written anything concerning this drink, but only a physician of Marcena, who, as it seems, writ only one by relation, holding an opinion that the chocolate is stopping, because that cocoa, the principal ingredient of which it is made, is cold and dry, but because this one reason may not have power to keep some from the use of it, who are troubled with opalations, I think fit to defend this confection. With philosophical reasons against any whosoever will condemn this drink, which is so wholesome and so good, knowing how to make the paste in that manner, that it may be agreeable to diverse dispositions in the moderate drinking of it, and so, with all possible brevity, shall distinguish and divide this treatise into four points or heads. In the first place I shall declare what chocolate is, and what are the qualities of cocoa, and the other ingredients of this confection, where I shall treat of the receipt set down by the aforesaid author of Marcena, and declare my opinion concerning the same. The second point shall treat of the quality, which resultest out of the mixture of these symbols which are put into it. In the third place the manner of compounding, and how many ways they use to drink it in the indies. In the fourth and the last place I shall treat of the quantity, and how it ought to be taken, at what time, and by what persons. CHOCOLATE OR AN INDIAN DRINK BY ANTONIAL COMINARO PART II THE FIRST POINT Concerning the first point I say, that chocolate is a name of the Indians, which in our vulgar Castilian we may call a certain confection, in which, among the ingredients, the principal basis and foundation is the cocoa, of whose nature and quality it is necessary first to treat. And therefore I say, according to the common received opinion, that it is cold and dry, a pro dominio, that is to say, that though it be true that every simple contains in it the qualities of the four elements, in the action and reaction which it hath in it, yet there results another distinct quality, which we call complexion. This quality or complexion, which arises of this mixture, is not always one and the same, neither hath it the effect in all the mixtures, but they may be varied nine ways. Four simple, from whence one only, quality doth abound, and four compounded, from whence two symbolizing qualities are predominant, and one other, which we call ad pontis, which is of all these four said qualities, which are equilibrium, that is to say, in equal measure and degree. Of all these the complexion of cacao is composed. Since there arise two qualities which are cold and dry, and in the substance that rules them, hath restringent and obstructive of the nature of the element of the earth, and then as it is mixed, and not a simple element, it must needs have parts correspondent to the rest of the elements, and particularly it partakes, and that not a little, of those which correspond with the element of air, that is, heat and moisture, which are governed by the unctious parts. There being drawn out of the cacao much butter, which in the indies I have seen drawn out of it, for the face by the curiolas. It may philosophically be objected in this manner. Two contrary qualities in disagreeing cannot be in graduateenso, in one and the same subject. Cacao is cold and dry in predominancy, therefore cannot have the qualities contrary to those which are heat and moisture. The first proposition is most certain, and grounded upon good philosophy. The second is contented unto, by all, the third which is the conclusion is regular. It cannot be denied that the argument is very strong, and these reasons being considered, by him of Marchina, have made him affirm that chocolate is obstructive, it seeming to be contrary to philosophy, that in it there should be found heat and moisture in graduateenso, and to be so likewise in cold and dry. To this there are two things to be answered, one that he never saw the experience of drawing out the butter which I have done, and that when the chocolate is made without adding anything to the dried powder, which it is incorporated, only by beating it well together, and is united and made into a paste, which is a sign that there is a moist and glutinous part which of necessity must correspond with the element of air. The other reason we will draw from philosophy, affirming that in the cacao there are different substances, in the one that is to say, in that, which is not so fat, it has a greater quantity of the oil than of the earthy substance, and in the fatter part it has more of the earthy than of the oily substance. In these there is heat and moisture in predominantly, and in the other cold and dry. Notwithstanding that it is hard to be believed, that in one in the same substance, and so little of the cacao, it can have substances so different. To the end that it may appear more easy, clear and evident. Next we see it in the rhubarb, which half it in hot and soluble parts, and parts which are binding, cold and dry, which have a virtue to strengthen, bind, and stop the looseness of the belly. I say also that he that sees, and considers the steel, so much of the nature of the earth, as being heavy, thick, cold, and dry, it seems to be thought unproper for the curing opulations, but rather to be apt to increase them, and yet it is given for a proper remedy against them. This difficulty is cleared thus, that though it be true that it half much of the earthy part, yet it half also parts of sulfur, and of quicksilver, which do open, and this will pillate neither doth it so, until it helped by art, as it is ground stirred and made fine in the preparing of it. The sulfurous parts, and those of quicksilver, being thin, active, and penetrative, they mingle at the last, with those parts, which are earthly and astringent, in so much that they being mingled after this manner one with another, we cannot now say that the steel is astringent, but rather that it is penetrative, attenuating and opening. Let us prove this doctrine by authorities, and let the first be from Galan 1.3 of the Qualities of Simples, Chapter 14, where, first of all, he teacheth, that all those medicines, which, to our sense, seem to be simple, are notwithstanding, naturally compounded, containing in themselves contrary qualities, and that is to say, a quality to expel and to retain, to incrasate and attenuate, to refee and to condense. Neither are we to wonder at it. It being understood, that in every foresaid medicine, there is a quality to heat and to cool, to moisten and to dry, and whatsoever medicine it to be, it hath in it thick and thin parts, rare and dense, soft and hard. And in the fifteenth chapter, following the same book, he puts an example of the broth of a cock, which moves the belly, and the flesh, hath the virtue to bind. He puts also the example of the aloes, which, if it was to be crushed, loses the purgative virtue, or that which it hath is but weak. That this differing virtue and faculty is found in diverse substances, or parts of simple medicants, Galen shows in the first book of his simple medicines, and the seventeenth chapter, bringing the example of milk, in which three substances are found and separated, that is to say, the substance of cheese, which has the virtue to stop the flux of the belly, and the substance of whey, which is purging and butter, as it is expressed in the said Galen, chapter fifteen, also we find in wine, which is in the must, three substances, that is to say, earth, which is the chief, and a thinner substance, which is the flower, and may be called the scum, or froth, and a third substance, which we properly call wine, and every one of these substances contains in itself diverse qualities and virtues in the color, in the smell, and in other accidents. Aristotle in the fourth book of the meteors, and the first chapter, treating putrefaction, he found the same substances, and in the second chapter, next following, were he that curious may read it, and also by the doctrine of Galen and Aristotle, diverse substances are attributed to every of the mixed, under one and the same form and quantity, which is very conformable to reason, if we consider, that every ailment be it ever so simple, begetts and produces in the liver, for humours not only differing in temper, but also in substance, and begetts more or less of that humor according as that ailment have more or fewer parts corresponding to the substance of that humor, which is most engendered, and so in cold diseases we give warm nourishment, and cold nourishment in hot diseases. From which evident examples, and many others, which we might produce to this purpose, we may gather that, when we grind and stir the cacao, the diverse parts, which nature has given it, do artificially and intimately mix themselves one with another, and so the unctuous warm and moist parts, mingled with the earthy, as we have said of the steel, represses and leaves them not so binding as they were before, but rather with a mediocrity, more inclining to the warm and moist temper of the air, than to the cold and dry of the earth, as it doth appear when it is made fit to drink, that you scarce give it two turns with the mullanette when there rises the fatty scum, by which you may see how much it partakeeth of the oily part. From which doctrine I gather that the author of Marchina was an error, who, writing of chocolate, saith that it causes opalations, as cacao is astringent, and if the astriction were not corrected, by the intimate mixing of one part with another, by means of the grinding, as is said before. Besides it having so many ingredients which are naturally hot, it must of necessity have this effect, that is to say, to open, attenuate, and not to bind, and indeed there is no cause of bringing more examples, or producing more reasons for this truth than that which we see in the cacao itself, which, if it not be stirred and compounded, as aforesaid, to make the chocolate. But eating of it, as isn't the fruit, as acrolase, eat it, in the indies, it doth notably obstruct, and cause stoppings, for no other cause but this, that the diverse substance which it contains are not perfectly mangled by the mastication, onely, but require the artificial mixture which we have spoken of before. Besides, our adversary should have considered, and called to his memory, the first rudiments of philosophy, that, adicto secundum quid adictum simplicitair non wallet consequentia. As it is not enough to say, the black amour is white, because his teeth are white, for he may be black, though he hath white teeth, and so it is not enough to say that the cacao is stopping, and therefore the confection which is made of it is also stopping. The tree which bears this fruit is so delicate, and the earth where it grows is so extreme hot, that to keep the tree from being consumed by the sun they first plant other trees, and when they are grown up to a good height, then they plant the cacao trees, that when it first shows itself above the ground, those trees which are already grown may shelter it from the sun, and the fruit doth not grow naked, but ten or twelve of them are in one gourd or cod, which is of the bigness of a great black fig, or bigger, and of the same form and color. There are two sorts of cacao, the one is common, which is of a gray color, inclining towards red, the other is broader and bigger, which they call patlaxte, and this is white and more drying, whereby it causes watchfulness and drives away sleep, and therefore it is not so useful as the ordinary. This shall suffice to be said of the cacao. And as for the rest of the ingredients, which makes our chocolateical confection, there is notable variety, because some do put into it black pepper, and also to-asco red root like matter, which is not proper because it is so hot and dry, but only for one who hath a very cold liver, and of this opinion was a certain doctor of the University of Mexico, of whom a religious man of good credit told me that he finding the ordinary round pepper was not fit to bring his purpose about, and to the end he might discover whether the long red pepper were more proper. He may trial upon the liver of a sheep, and putting the ordinary pepper on one side and the red pepper chili on the other, after twenty-four hours, the part where the ordinary pepper lay was dried up, and the other part continued moist, as if nothing had been thrown upon it. The receipt of him who wrote Marchina is this, of cacao, seven hundred, of white sugar, one pound and a half, cinnamon, two ounces, of long pepper, fourteen, of cloves, half an ounce, three cods of the long wood, or campesh tree, or instead of that, the weight of two reels, or a shilling of anice seed, as much of aguillote, as will give the color, which is the quantity of a hazelnut, some put in almond kernels of nuts and orange-flower water. Concerning this receipt, I shall first say, this shoe will not fit every foot, but for those who have diseases, or are inclining to be infirm, you may either add or take away according to the necessity, and temperature of every one. And I hold it not a mess, that sugar be put into it, when it is drunk, so that it be according to the quality, I shall hereafter set down. And sometimes they make tablets of the sugar, and the chocolate together, which they do only to please the pallets, as the dames of Mexico do use it, and they are there sold in shops, and are confected, and eaten like other sweet meats, for the cloves which are put into this drink, by the aforesaid author. The best writers of this composition use them not, per adventure upon this reason, that although they take away the ill-saver of the mouth, they bind, as a learned writer, have expressed in these verses. Fittorem emendat oris cariofilia foidum, constringunt ventrem, primaque membra juant. Lungs do perfume a stinking breath, and bind the belly, hence the prime members, comfort find. And because they are binding, and hot, and dry in the third degree, they must not be used, though they help the chief parts of a concoction, which are the stomach and liver, as appears by the verses before recited. The husks, or cods of longwood, or campesh, are very good, and smells like fennel, and every one puts in of these, because they are not very hot, though it excused not the putting in of a nice seed, as says the author of this receipt, for there is no chocolate without it, because it is good for many cold diseases, being hot in the third degree, and to temper the coldness of the cacao. And it may appear, it helps the indisposition of the cold parts. I will cite the verses of one curious in this art. The rains, the bladder, throat and thing between, and trails and liver with the head and spleen, and other parts by anise, it are comforted, so greater virtues in that little seed. The quantity of a nut of the aciote-tasco is too little to color the quantity made according to his receipt, and therefore he that makes it may put in it as much as he thinks fit. Those who add almonds and nuts do not ill, because they give it more body and substance than maize or panazio grain like millet, which others use, and for my part I should always put it into chocolate, for almonds, besides what I have said of them before, are moderately hot and have a thin juice, but you must not use new almonds as a learned author says in these verses. And the small nuts are not ill for our purpose, for they have almost the temper which the almonds have, only because they are drier, they come nearer the temper of color, and do therefore strengthen the belly and the stomach being dried, for so they must be used for the confection, and they preserve the head from those vapors which rise from the belly, as it appears by the said author in these verses. Philbirds breed color, the belly fortify, benzoin the head freeze, from fumosity, and therefore they are proper for such as are troubled with ventuosities, and hypocrondyriacial vapors, which offend the brain, and their cause troublesome dreams and sad imaginations. Those who mix maize or panazio in the chocolate do very ill, because those grains do beget a very melancholy humor, as the same author expressed in these verses. Grassa melancholicum prestant tippi panica sucum, siccant si penas membra gelant que furis. Gross ears of corn have choloriki juice, no doubt, which dries if taken inward, cools without. It is also apparently wendy, and those which mix it in this confection, do it only for their profit by increasing the quantity of the chocolate, because every fenedgia, or measure of maize or indian, wheat, granny, containing about a bushel and a half, is sold for eight shillings, and they sell this confection for four shillings a pound, which is the ordinary price of the chocolate. This cinnamon is hot and dry in the third degree, it provokes urine, and helps the kidneys and rice, of those who are troubled with cold diseases, and it is good for the eyes, and in effect it is cordial, as appears by the author of these verses. Cinnamon helps the reins in urine well, it clears the eyes and poison doth expel. The acchiote has a piercing attenuating quality, as appeareth by the common practice of the physicians in the indies, experienced daily in the effect of it, who do give it to their patients to cut and attenuate the gross humours, which do cause shortness of breath and stopping of urine, and so it may be used for any kind of opalations, for we give it for the stoppings which are in the breast, or in the region of the belly, or any other part of the body. And concerning the long red pepper there are four sorts of it, one is called acchiotes, the other very little, which are called chiltapin, and these two kinds are very quick and biting, the other two are called tonchillies, and these are moderately hot, for they are eaten with bread, as they eat other fruits, and they are of a yellow colour, and they grow onely about the towns which are in and adjoining to the lake of Mexico. The other pepper is called chlopakilagua, which has a broad husk, and this is not so biting as the first, nor so gentle as the last, and is that which is usually put into the chocolate. There are also other ingredients which are used in this confection, one called mechasucho, and another which they call vincaxtile, which in the spanners they call orahales, which are sweet-smelling flowers, aromethical and hot, and the mechasucho have a purgative quality for in the indies they make a purging portion of it. Instead of this in Spain they put into the confection powder of Alexandria for opening the belly. I have spoken of all these ingredients that every one may make a choice of those which please him best, or are most proper for infirmities. As concerning the second point I say, as I have said before, that though it be true that the cacao is mingled with all these ingredients which are hot, yet there is to be a greater quantity of cacao than of all the rest of the ingredients which serve to temper the coldness of the cacao, just as when we seek of two medicines of contrary qualities to compound one which shall be of a moderate temper in the same manner to thresalt the same action and reaction of the cold parts of the cacao, and of the hot parts of the other ingredients which makes the chocolate of so moderate a quality that it differs very little from a mediocrity, and when there is not put in any ordinary pepper or cloves, but only a little aniseed, as I shall show hereafter, we may boldly say that it is very temperate, and this may be proved by reason and experience, supposing that which Gallon says to be true that every mixed medicine warmth the cold and cooleth the hot bring in the example of oil of roses. By experience I say that in the Indies, as is the custom of the country, I coming in a heat to visit a sick person and asking water to refresh me, they persuaded me to take a draft of chocolate, which quenched my thirst, and in the morning, if I took it fasting, it did warm and comfort my stomach. Now let us prove by reason. We have already proved that all the parts of the cacao are not cold, for we have made it appear that the unctuous parts which are many be all hot or temperate, then, though it be true, that the quantity of the cacao is greater than all of the rest of the ingredients, yet the cold parts are the most, not half so many as the hot, and if for all this they should be more, yet by stirring and mangling of the warm, unctuous parts, they are much qualified. And on the other side it being mixed with the other ingredients, which are hot in the second and third degree, being the predominant quality it must needs be brought to a mediocrity. Like as two men who shake hands, the one being hot and the other cold, the one hand borrows heat, and the other is made colder, and in conclusion, neither hand retains the cold or heat it had before, but both of them remain more temperate. So likewise two men, who go to wrestle, at the first they are all in their full vigor and strength, but after they have struggled for a while, their force lessens by degrees, till at last they are both much weaker than when they began to wrestle. And Aristotle was also of this opinion in his fourth book of Nature of Beasts, Cap III, where he says that every agent suffers with the patient as that which cuts is made dull by the thing it cuts, that which warms cools itself and that which thrusts or forces forward is in some sort driven back itself. From whence I gather it is better to use chocolate after it hath been made some time, a moment at least. I believe this time to be necessary for breaking the contrary qualities of the several ingredients and to bring the drink to a moderate temper, for as it always falls out at the first that every contrary will have its predominancy, and will work his own effects, Nature not liking well to be heated and cooled at the same time. And this is the cause why Gallon in his twelfth book of Method doth advise not to use Phelonium till after a year or at least six months, because it is a composition made of opium, which is cooled in the fourth degree, and of pepper, and other ingredients which are hot in the third degree. This theorem and doctrine is made good by the practice which some have made, of whom I have asked, which chocolate did best agree with them, and they have affirmed that the best is that which hath been made some moments, and that the new doth hurt by loosening the stomach. And in my opinion the reason of it is that the unctuous or fat parts are not altogether corrected by the earthly parts of the cacao. And this I shall thus prove, for as I shall declare hereafter, if you make the chocolate boil when you drink it, the boiling of it divides the fat and oily part, and that makes a relaxation in the stomach in the old chocolate, as well as if it were new. So that I conclude in this second point that the chocolateical confection is not so cold as the cacao, nor so hot as the rest of the ingredients, but there results from the action and reaction of these ingredients a moderate temper which may be good both for the cold and hot stomachs, being taken moderately, and shall be declared hereafter, and it having been made a moment at the least, as is already proved. And so I know not why any many having made experience of this confection, which is composed, as it ought to be, for every particular, should speak ill of it. Besides, were it so much used, the most, if not all, as well in the Indies as in Spain, find it agreeeth well with them. He of Marchina has no ground in saying that it did cause opalations, for if it were so, the liver being obstructed, it would extenuate its subject, and by experience we see to the contrary, that it makes fat, the reason whereof I shall show hereafter, and this shall suffice for the second point. CHOCOLATE OR AN INDIAN DRINK The third point. Having treated in the first point of the definition of chocolate, the quality of the cacao, and of the other ingredients, and in the second point of the complexion which results from the mixture of them, there remains now in the third point to show the way how to mingle them. And first I will bring the best receipt, and the most, to the purpose that I could find out. Although it be true, which I have said, that one receipt cannot be given which shall be proper for all, that is to be understood of those who are sick. For those that are strong and in health, this may serve. And for the other, as I have said in the conclusion of the first point, everyone may make choice of the ingredients as they may be useful to this or that part of his body. The receipt is this. To every one hundred cacaos, you must put two cods of the long red pepper, of which I have spoken before, and are called in the Indian tongue Chilparlagua, and instead of those of the Indies, you may take those of Spain which are broadest and least hot. One handful of aniseed or orelas, which are otherwise called pinacaxlidos, and two of the flowers called mechasuchel, if the belly be bound. But instead of this, in Spain, we put in six roses of Alexandria beat to powder, one cod of Campeche or logwood, two drams of cinnamon, almonds and hazelnuts of each one dozen, of white sugar half a pound, of achiote enough to give it the color. And if you cannot have those things which come from the Indies, you may make it with the rest. The way of compounding. The cacao and the other ingredients must be beaten in a mortar of stone or ground upon a broad stone which the Indians call matate, and is only made for that use. But the first thing that is to be done is to dry the ingredients, all except the achiote, with care that they may be beaten to powder, keeping them still in stirring that they may not be burnt or become black, and if they be overdried they will be bitter and lose their virtue. The cinnamon and the long red pepper are to be first beaten with the anise seed, and then beat the cacao which you must beat by a little and little till it be all powdered, and sometimes turn it round in the beating that it may mix the better. And every one of these ingredients must be beaten by itself, and then put all the ingredients into the vessel where the cacao is, which you must stir together with a spoon, and then take out that paste and put it into the mortar under which you must lay a little fire after the confection is made. But you must be very careful not to put more fire than will warm it, that the unctuous part does not dry away. And you must also take care to put in the achiote in the beating, that it may the better take the color. You must searse all the ingredients but only the cacao, and if you take the shell from the cacao it is the better, and when you shall find it to be well beaten and incorporated, which you shall know by the shortness of it, then with a spoon take up some of the paste which will be almost liquid, and so either make it into tablets or put it into boxes, and when it is cold it will be hard. To make the tablets you must put a spoonful of the paste upon a piece of paper, the Indians put it upon the leaf of a plantain tree, where being put into the shade it grows hard, and then bowing the paper the tablet falls off by reason of the fatness of the paste. But if you put it into anything of earth or wood it sticks fast and will not come off but with scraping or breaking. In the indies they take it two several ways, the one being the common way is to take it hot with a toye which was the drink of the ancient Indians. The Indians call a toye papay made of the flower of maize, and so they mingle it with the chocolate, and that the a toye may be more wholesome they take off the husks of the maize which is windy and melancholy, and so there remains only the best and most substantial part. Now to return to the matter I say that the other modern drink which the Spaniards use so much is of two sorts.  The other is to warm the water and then when you have put it into a pot or dish as much chocolate as you think fit put in a little of the warm water and then grind it well with the mullanette and when it is well ground put the rest of the warm water to it and so drink it with sugar. Besides these former ways there is one other way which is put the chocolate into a pipkin with a little water and let it boil well till it be dissolved and then put in sufficient water and sugar according to the quantity of the chocolate and then boil it again until there comes an oily scum upon it and then drink it. But if you put too much fire it will run over and spoil but in my opinion this last way is not so wholesome though it pleases the palate better because when the oily is divided from the earthy part which remains at the bottom it causes melancholy and the oily part loosens the stomach and takes away the appetite. There is another way to drink chocolate which is cold and it takes its name from the principal ingredient and is called cacao which they use at feast to refresh themselves and it is made after this manner. The chocolate being dissolved in water with the mullanette take off the scum or crassie part which rises in greater quantity when the cacao is older and more putrified.  And this drink is so cold that it agreeeth not with all men's stomachs for by experience we find the herded doth by causing pains in the stomach and especially to women. I could deliver the reason of it but I avoid it because I will not be tedious some use it etc. There is another way to drink it cold which is called cacao penoli and it is done by adding to the same chocolate having made the confection as is before set down so much maize dried and well ground and taken from the husk and then well mingled in the mortar with the chocolate it falls all into flour or dust and so these things being mingled as is said before there rises the scum and so you take and drink it as before. There is another way which is a shorter and quicker way of making it for men of business who cannot stay long about it and it is more wholesome and it is that which I use that is first to set some water to warm and while it warms you throw a tablet or some chocolate scraped and mingled with sugar into a little cup and when the water is hot you pour the water to the chocolate and then dissolve it with the mullanette and then without taking off the scum drink it as is before directed. The fourth part. There remains to be handled in the last point of the quantity which is to be drunk at what time and to buy what persons because if it be drunk beyond measure not only of chocolate but of all other drinks or meats though of themselves they are good and wholesome they may be hurtful and if any find it opillative it comes by the too much use of it as when one drinks over much wine instead of comforting and warming himself he breeds and nourisheth cold diseases because nature cannot overcome it nor turn so great a quantity into good nourishment. So he that drinks much chocolate which hath fat parts cannot make distribution of so great a quantity to all the parts and that part which remains in the slender veins of the liver must need cause opillations and obstructions. To avoid this inconvenience you must only take five or six ounces in the morning if it be in winter and if the party who takes it be caloric instead of ordinary water let him take the distilled water of indive the same reason serves in summer for those who take it physically having the liver hot and obstructed if his liver be cold and obstructed then to use the water of rhubarb and to conclude you may take it till the month of May especially in temperate days but I do not approve that in the dog days it should be taken in Spain unless it be one who by custom of taking it receives no prejudice by it and if he be of a hot constitution and that he have need to take it in that season let it as is said before be mingled with water of indive and once in four days and chiefly when he finds his stomach in the morning to be weak and fainting and though it be true that in the indies they use it all the year long it being a very hot country and so it may seem by the same reason it may be taken in Spain first I say that custom may allow it secondly that as there is an extraordinary proportion of heat so there is also of moisture which helps with the exorbitant heat to open the pores and so dissipates and impoverisheth our substance or natural vigor by reason whereof not only in the morning but at any time of the day they use it without prejudice and this is most true that the excessive heat of the country draws out the natural heat and disperses that of the stomach and of the inward parts in so much that though the weather be never so hot yet the stomach being cold it usually doth good I do not only say this of the chocolate which as I have proved hath a moderate heat but if you drink pure wine be the weather never so hot it hurts not but rather comforts the stomach and if in hot weather you drink water the hurt it doth is apparent in that it cools the stomach too much from whence comes evisciated concoction and a thousand other inconveniences you must also observe that it being granted as I have said that there are earthy parts in the cacao which fall to the bottom of the cup when you make the drink diverse or of the opinion that that which remains is the best and the more substantial and they hurt themselves not a little by drinking of it for besides that it is an earthy substance thick and stopping it is of a melancholy nature and therefore you must avoid the drinking of it contenting yourself with the best which is the most substantial last of all there rests one difficulty to be resolved formally pointed at namely what is the cause why chocolate makes most of them that drink it fat for considering that all of the ingredients except the cacao do rather extenuate than make fat because they are hot and dry in the third degree for we have already said that the qualities which do predominate in cacao are cold and dry which are very unfit to add any substance to the body nevertheless I say that the many unctuous parts which I have proved to be in the cacao are those which pinguify and make fat and the hotter ingredients of this composition serve for a guide or vehicle to pass to the liver and the other parts until they come to the fleshy parts and they are finding a like substance which is hot and moist as is the unctuous part converting itself into the same substance it doth augment and pinguify much more might be said from the ground of philosophy and physique but because that is fitter for the schools than for this discourse I leave it and only give this caution that in my receipt you may add melon seeds and seeds of Pompeons of Valencia dried and beaten into powder where there is any heat of the liver or kidneys and if there be any obstructions of the liver or spleen with any cold distemper you may mix the powder of Cetarec to which you may add amber or musk to please the scent and it will be no small matter to have pleased all with this discourse finish how to make use of the chocolate to be taken as a drink exceeding cordial for the comfort of the healthful and also for those in weakness and consumptions to be dissolved in milk or water if you please to take it in milk to a quart three ounces of chocolate will be sufficient scrape your chocolate very fine put it into your milk when it boils work it very well with the Spanish instrument called Mola Neo between your hands which instrument must be of wood with a round knob made very round and cut ragged that as you turn it in your hands the milk may froth and dissolve the chocolate the better then set the milk on the fire again until it be ready to boil having the yolk of two eggs well beaten with some of the hot milk then put your eggs into the milk and chocolate and sugar as much as you like for your taste and work all together with the Mola Neo and thus drink a good draft or if you please you may slice a little mansion into a dish and so eat it for a breakfast you may if you please make your chocolate with water and sugar working it after the same order with your Mola Neo which for some weak stomachs may chance to be better liked and many there be that beat almonds and strain them into the water it is boiled and wrought with the chocolate and sugar others like to put the yolks of eggs as before in the milk and even sweeten it with sugar to your taste if you drink a good draft of this in a morning you may travel all the day without any other thing this is so substantial and cordial the manner of making chocolate set a pot of conduit water over the fire until it boils then to every person that is to drink put an ounce of chocolate with as much sugar into another pot wherein you must pour a pint of the said boiling water and therein mingle the chocolate and the sugar with the instrument called L Mola Neo until it be thoroughly incorporated which done pour in as many half pints of the said water as there be ounces of chocolate and if you please you may put in one or two yolks of fresh eggs which must be beaten until they froth very much the hotter it is drunk the better it is being cold it may do harm you may likewise put in a slice of white bread or biscuit and eat that with the chocolate the newer and fresher made it is the more benefit you shall find by it that which comes from foreign parts and is stale is not so good as that which is made here finis end of section three end of chocolate or an indian drink by Antonio Comanero de La Desma


Everybody forced here up in 2022 Phoenix in impeccable football hobby three box mixer number 11 random teams find the results any time a late in sports cards Com let's do it To Phoenix one impeccable. I'll see you one of one of these boxes any box That's been ridder to 149 on the rookie ball relic auto nice card Falcons So there's some peel in the back of this and there's that scratch right there We're gonna send a box never the Falcon spot But congrats on the ridder. Did you pick here Cole? Hold your I told no, I didn't close off the board Shaquille entered silver for the Colts I Can't lock down the Cardinals corner. Dang it Hot Routes Jay Jetta's for the Vikings numbered 15 out of 35 The blue there. I wonder why the blue looks purple in this but checklist says blue contours chase Canler says he's got the Ravens and he's good luck Wandael Daven Cook yellow. It's like a Vikings color match 67 to 75 rookie rising trail on Berks You done. Yeah, no more drip guys Sam canceled it early. I guess Blame there was Matt Rockin Colts numbered 80 of 99 Josh Allen flame throwers bills. So next time there's personals tomorrow on drip with 10s and shares of five Lava Mahomes they need to make these lower number. These are sick. Yeah 120 of 175 chiefs Hot Routes CD I'm with that I'm with that orange Jamo for the Lions 8499 flame throwers raider Falcons silver Davis price working for the Niners Where's your biggest hit tonight Sam Taylor Britt rookie red for the Bengals To 250 Oh, yeah That's pretty big McBride to 99 rookie patch card Cardinals three color color burst rookie Kennedy Brooks Eagles Hold a pale a relic auto out of that's cool That's cool, that's pretty big pretty big Skymore rookie rising for the chiefs. Whoa, whoa points card Eagles flame throwers Jalen Hertz Wild card Grand everybody at the end here and again rookie rising skymore at a 199 also hit UC Oh The ticket Red rookie Jordan Davis Eagles to have a 250 Kurt Warner fire forged. I'm like, where are they getting these Lamar stickers, dude? I pull one tonight, too Kyle Hamilton pink rookie for the Ravens number 175 of 199 Yonte Johnson one more Phoenix. It's a loudest chair in existence I'm throwing that chair out Got a red rookie Jets Jeremy Ruckert Number 26 at 250. I'm chucking it out. Why not fire the parking lot flame throwers Kenny Pickett Steelers? Sack will have to sacrifice it so the other chairs won't squeak Pink rookie Charleston Rambo Panthers.  Silver Rashad penny Matt Corral flamethrowers orange Panthers 17 of 99 fire forage Brady Pat's It's all about a 99 Matt Corral Panthers rookie patch card And a color burst rookie Jalen watermire Patriots hot routes yellow AJ Brown for the Eagles 52 out of 75 and a hot routes Chris Godwin Michael Carter jets on the Silver Auto And silver rookie Daxon Hill bangles Devin McCarty Patriots on the purple number at 75 out of 125 Stefan digs hot routes and orange David Montgomery Bears Number 57 and 99 flame throwers Dak. All right guys impeccable time base parallels T Higgins 55 of 75 bangles Patriots Demian Harris 20 of 50 Eagles Devontae Smith 11 of 75 rounds Elegans patch auto Kareem Hunt 19 of 35 Falcons Rookie Auto Tyler Algear 31 of 35. I need to look this one up. Actually I want to make sure the team on this one. All right, this is going to be random at the end between the Cardinals and the Steelers impeccable dual redemption JJ watt TJ Watt Dude that will be sick. Good luck on that one. I Assume it's two different spots here Yeah, good luck on that random at the end JJ watt TJ watt impeccable duals We've got Super Bowl auto Steve Young 49ers 25 out of 25.  It's a great box here and this one elegance Whoa, look at that to 25 part of the floor to lead on the helmet and a glove rookie auto Chris O'Lave 17 of 25 Holy crap, great box those last three cards. All right two randoms here First random is the points random wild card points to everybody and Then the next one is impeccable duals JJ watt TJ watts. That'll be sick We'll give ten dollars bad beat credit whoever doesn't get this one on the random Cardinals Steelers ten times on both five five points first ten times one two three four five six seven eight nine and ten Ravens get wild card points and walk brothers. Good luck one two three four five six seven eight nine and ten Steelers up top Congrats Steelers recap we had relics Trey McBride Matt Corral Autos of Michael Carter Desmond Ritter Trey McBride Tyler Algier Kareem Hunt box is good Steelers got the redemption JJ watt TJ wadding pink will doles Steve young Superb lot of the 25 Niners And Chris O'Lave helmet and glove rookie out of the 25 Saints I'll do it guys one more tonight one more break tonight


young people in the universe used to polish jams. The future of these exchanges between the two countries is only when the countries that make decisions will be very open. The exchange will also lead to a new number. Instability. We stand on common ground in opposing expansionism and interference in the affairs of independent states. We're united by... I look forward to returning to the honor of your visit and having your country in the spring. Mr. Premier, you have an active week ahead of you. I look forward to getting to know you better. We're pleased that you'll have the opportunity to see some... Exists a necessary for both sides to show mutual respect. By both sides, in the joint communiques, perform the obligations each other. We use the Chinese relations in a lot of roles. Thank you, Mr. President, for special treatment to the Chinese journalists.


I'm a developer advocate at Google. I tweet at Thagamizer RB, and all the code that I'm going to show in this talk is on GitHub. I'm Thagamizer on GitHub, and it's in my examples repository in the RailsConf 15 folder. And since I'm showing you code, I have to say that all the code in this talk is copyright Google and licensed under Apache V2. So first things first, I'm not an expert at ops. I'm actually not an expert at anything. I tend toward more drack of all trades, master of none. But I've spent some time racking servers, and I've had bloody knuckles to prove it. And I've built things that look like this, but my skills have not gotten to the level of this yet. And when I try to do something that's all professional ops fancy, I end up building things that look a little bit like this. And why is that? Because I'm fundamentally lazy. I'm passionate about some things, solving problems, building sites, algorithms. But I'm lazy about deployment and operations and maintenance, and I find a lot of that stuff to be fiddly and not a lot of fun.  And what do I mean specifically by lazy? I mean doing the minimum that you absolutely have to to have something be successful and stable.  And one way I've found to do that is with containers. So what the heck's a container? So according to several sources, a container is a way for multiple applications to securely share hardware with a minimum footprint. And frequently this means less of a footprint than using virtual machines. To me, containers can also be an environment package.  Or wrapping up your application with its execution environment. And this takes me back to the old days when I was making little applications that I was giving to my friends on floppy disks and I had to make sure I included all the DLLs that they needed to run them. So how do you use containers? Well, I use Docker. There are lots of container frameworks. There's lots of ways to do containers. Wikipedia will give you a list and a nice little chart of all of them. But I like Docker because there's a great community and ecosystem that go along with the container format. And many common web frameworks, including Rails, while we're why we're all here today, have containers that are freely available on Docker Hub, which is like RubyGems for Docker containers, container images. So Docker sounds awesome. How do you use it? So I'm going to do a quick demo using a basic Rails app. And by basic Rails app, I mean very, very basic. Built solely with the scaffold. This is me. And this is a to-do list app. Standard Rails stuff. You know, it's got a title. Very, very long title. This is me telekinetically typing. Got some notes. You have a due date. And then there's a completion integer where you can put in the percent complete. And I'm sure that most of you guys in the audience could rip something that looked a lot like this up in a couple of minutes, but let's actually walk through all the steps. So to make this application, Rails need to do. And there's a lot of tutorials out there for using Docker and Rails, but almost all of them stop here. They don't actually have any sort of models. And a Rails app without models is kind of boring. So let's make a simple model for a task, has a title, some notes, a due date, and a completion parameter, which is just an integer. And to make it a little more exciting, I'm going to use Postgres as my production database, but I'm going to use SQLite in Dev and Test. This is probably familiar to a lot of you. It's something that you've done multiple times before. And if you're going to use Postgres as your production database, you need to change the default Rails gem file. Here's the gem file I ended up with, which shouldn't be incomprehensible. But in red right now are the two pieces I had to change, and you still can't see them, so let's zoom in a bit. So create a new group for production, put the PG gem in it. And then I need to move SQLite, which is in the default, is in all groups in the default gem file, into the development of production group. So that's great. And since I changed my database setup, I also need to change my database YAML file. And those are the lines I need to change. Set the adapter to Postgres for production, and then I'm going to set my username, password, and host from some environment variables that Docker sets for me, and I will come back to this, I promise. So now I need Dockerfile, and Dockerfile is just the list of things that need to happen to set up your environment. And I'm lazy, so I'm going to write a minimal Dockerfile, and I can do a Dockerfile for this application in three lines, really, just three. The first line is telling me what image I want to start from. All Docker images, most Docker images, are built from other images. So the Rails image is built from a Ruby image. The Ruby image is built from an operating system image, and turtles all the way down. I'm using the Rails image because it's really close to exactly what I want, and therefore I don't have to know anything about ops or how to install packages on an Ubuntu machine or anything like that if I don't want to. And then I'm also going to specify that my RailsMF is production, because this isn't in the Rails image that I pulled. And then the CMD, this command line, is the entry point for my application. This is what happens once my container is built and my app needs to start up. And you'll see that I'm calling a shell script here. So let's see what's in that shell script, my init.sh shell script. And it's, again, three very simple lines. I'm doing an export of secret key base because Rails 4, bundle exec, dbcreate, and then I'm starting up Rails server. Yes, I'm using the default server. You could use Unicorn. You could use something else, lazy. But there's nothing really complicated going on here. I hacked all this stuff together one night at a hack night and not very long at all. So now let's build it. We need to build up our image with Docker. And an image, I've used that word a couple of times, is just a template for a container. Docker build, thagomizer slash to do. The dot on the end means use a Docker file in this directory. And this builds it. So let's see what that looks like. So that's done. And that went really, really fast. And I'm going to hand wave this a bit, but one of the reasons it went really fast is the Docker caches all the intermediate steps in creating the image. So if I only change, and each of those steps is a layer, and if I only change something at the very end in those last layers, I can use the cached versions of all the ones before that. Which means I don't have to repeat all of the steps, like pulling down packages from your package, from your distro's package management system, or building gems from scratch if they have C extensions. I can skip all that if I'm not changing any of that stuff. And that means it builds really quickly. So now it's built. Let's run it. I'm going to run through these commands. I don't know what people's experience with Docker is in the audience, but I'm assuming that you have as about as much as I had three months ago, which is this much. So Docker run. First we're going to do the database component, because we need the database up and running before we start the web. So this command creates a new container named DB, and it uses the Postgres image to do that. These two lines are setting some environment variables for that Postgres container. And these set the password and username for the Postgres database. And all of this is documented in lovely detail on the GitHub page for the Postgres image. I'm following the instructions.  And then this dash D means we're going to run it demonized. So I'm not going to get the standard out. I'm going to let it run in the background and do its thing. And I'm not going to interact with the container in any way. And now I'm going to start the web server up. Again, we're going to run a container named web. We're using the Thagamizer to do image that I just showed how it built. Again, we're going to run it demonized. This line is mapping ports. That's what the P stands for. And what I'm doing here is I'm mapping port 3000 on my container to 3000 on the host machine. In that case, this case, it could be local host on a Linux box on my Mac. It's a Linux VM. And then this line is magic and lovely. So the link makes it so that my containers can talk to each other. And in this case, I am linking the DB container that I just made to the container I'm starting up now, the web container. And I'm linking it with the alias PG for Postgres. And what link does is it creates a secure tunnel between my web container and my database container. And it also puts a bunch of handy environment variables in my web container so that I can connect to the database container. And that Postgres username, Postgres password, and Postgres host address, all of that that was in the database.yaml file, those are created because I used this link flag on my Docker startup. So let's watch it. That's the database starting up. That's the web starting up. They're up. There's lots of ways to set up virtual machines for testing out your app. This is really, really fast. I'm going to grab the IP, throw it in a browser, be indecisive about which profile I want to use in Chrome, go to port 3000, the tasks collection. There it is, that's my app running. And in case it wasn't obvious, I got all of this stuff set up in less than 20 lines of code beyond the standard Rails boilerplate that Rails Nu gives you. That's about five lines of code to change the gem file, about five lines of code in the database.yaml, three lines in the Docker file, and three lines in init. That's it. I don't know any ways that I can set up a Rails app to run on a boon two that are quite this easy. And there's a couple shell commands, but it still all comes in under 20 lines of code. So why would you use something like Docker? Why would you use containers? Some pros. For me, the biggest one is consistency. I hate hearing, but it works on my machine. I started my career in QA. I've heard that so many times. And I don't care if it works on your machine. I care if it works in production.  They are the same image. They are the same OS with the same libraries, all the same versions, you don't have to worry about messing up your gem file slightly and getting the wrong one minor version off in a way that messes up your app. The next talk, the one after mine, is going to talk about how you can also use Docker in development and possibly have exactly the same OSes and libraries and stuff in development, so there's none of this. But it works on my machine stuff. It either works or it does. Everyone has the same experience. Speed, containers start up really, really quickly. There was a video that came out from the Kubernetes team last week, two weeks ago, about them racing a Kubernetes cluster versus making a latte. It ended up being a neck and neck tie. We're talking minutes. And I've worked on apps where we had Chef Build and Chef's very cool, but rebuilding all of our VMs from scratch took upwards of 15 minutes because of all the stuff we were having to build from source. And being able to start up a container very, very quickly is nice, especially when you want to do things like auto-scaling. And the caching makes it fast if you're only changing the last layers. Flexibility, if you've got a microservices setup or we're in the distributed computing track, containers let you change how the different processes sit on different hardware. So you have a VM. You can say in development you want all the stuff to run on the same VM. In test, you want it to be split up in one way. In your staging environment, you want one of every machine on a separate VM. And then in production, you want five web servers and two database backends. And all of that can be set up pretty easily with a variety of container management tools. Portability, I talked to folks about why they do or do not use the cloud or why they roll their own or why they have their own hardware. And everyone's like, I need flexibility. I need to be able to move back and forward. And containers are great because you can run them on Linux, you can run them on a Mac, you can run them on Windows, you can run them on your personal machine, you can run them on data center hardware that your company owns, you can run them on a cloud provider. Most cloud providers support containers right now. You're never locked into specific hardware. You can move it anywhere, and it'll behave the same. And then repeatability, last year about this time was particularly bad if you had a DevOps as part of one of your hats you were wearing. You're patching rail security bugs. You're patching open SSL security bugs. And I was on a team that was doing DevOps at the time. And we had our client was a little bit nervous about us making OS level changes. Making changes to the OS libraries. Because we pushed code a couple of times a week. And that was all automated. And we had that down. But every time we had to do something lower level than that, we didn't have a process for that. And the nice thing about using containers is the process for, if you set it up this way, containers are flexible, you can make it so the process for updating your code is the exact same process for updating your OS is the exact same process for updating the C libraries you have. And so it's only one process, everyone knows it, and there's much less likely that you're going to mess it up. So there might be some cons. The biggest one is Yagney. You aren't going to need it. For some apps, and I'm not going to say this is most apps, but if you're doing a small proof of concept thing or your personal blog, maybe you don't need containers. Maybe the overhead of setting that up is too much for you, and you'd rather just use a platform as a service provider. That's fine. This is a very cool tool for people who can get benefit out of it, but I'm never going to say that any one tool is perfect for every application. And the other thing is that while containers have been around for a long time, I work at Google, and Google's been running all of their internal stuff on containers for years. Docker is still only a few years old, and some people are reticent about adopting stuff that's on the first half of the adoption curve. I am not one of those people. Y'all are at Ruby RailsConf. I assume y'all aren't those people.  But I think it's really cool. Otherwise I wouldn't be doing this talk. So I've showed you some pretty cool stuff about running these containers on my Mac, but I don't think any of you actually run through production site off of MacBook Air. If you do, I have a dinosaur for you. We should come chat afterwards. So how do you manage containers in a cloud environment? How do you manage containers in a data center environment when you want multiple versions of something or you want five front end web servers? And I'm going to talk about Kubernetes. There's lots of ways of managing containers. This is the one that I happen to know. And it's a Google project for managing clusters of containers. Basically, the idea is that you build up a list of your desired state in the format that Kubernetes understands, and then you start up Kubernetes on a group of VMs or bare metal machines and say, make it look like my desired state. And I want to point out specifically that Kubernetes is open source. There are more contributors outside Google than inside Google at this point. And all this is on GitHub. Very, very visible what's going on.  I'm going to hit it up.  Master, this is the machine that manages everything. Masters have a set of minions. Usually, there's several of them. They're running on different VMs. The underlying base unit is a pod, and this is the smallest deployable unit. You can think of it as part of an application that intrinsically works together, not independently. And I asked some folks who work on Kubernetes, I'm like, so if you have a web application, is the web application plus the DB a pod or is the web app a pod and the database is a pod? And the answer is, it depends. I'm going with web app and the database are going to be separate pods because I want to scale the two pieces independently. For the demo, I'm only going to have one database, but I'm going to have two front end web servers. But if you want to put them together, you can do that too. So a service is an abstraction for a logical set of pods, which is a lot of very fancy words to basically mean a named load balancer. And if I have multiple pods, I have a service that takes care of splitting the work up between them. Services are also how different pods talk to each other, like we had links so that the database could talk to the web container on my local machine. We build services so that my database pods can talk to my web pods in the Kubernetes cluster. And then we have a replication controller. And this is responsible for ensuring that the correct number of pods are running at all times. When you set up a replication controller, you say, this is my desired state. I'd like two replicas. And the replication controller is responsible for saying, are there two replicas? Yes. If one of those machines fails, it starts up another. If you somehow end up with extras, it'll shut one down. I want to also put some notes. This is currently in beta. The API may change. But people are using it. So warning, but it's still awesome. And one of the things I want to be very explicit about is that Kubernetes gives you options. This is open source. You can run this on your own hardware. You can run this on a cloud provider's VMs. Google Cloud Platform supports it. But there are others who are working with Kubernetes. There are other companies that work with Kubernetes. And this technology does not lock you into a specific provider.  And I like giving technical talks with lots of code. So let's look at some code. This is a hand-wavy example of a Kubernetes configuration file. And this is not a specific one. But the basic format's similar for a lot of them. So you have an ID. You have a kind, which could be things like pod or service or replication controller. The API version, desired state. And that desired state is where you set up, this is what I want Kubernetes to maintain for me. And that has maybe a set of containers or something else. And then there's some labels. And these are just used so that you can gather together things that are related and refer to groups more easily. So for this example, let's do the database first. So I'm going to have one database pod. And there's a bunch of ellipses on here where I pulled out a lot of extra braces because JSON on slides doesn't work so hot. But this is the pod configuration file for the database. And I'm specifically showing that it has a set of containers. And that's an array with one unit in it. The container is named DB. It uses the Postgres image. I can pass in my environment variables just like I did to Docker run. And then I can also do some ports. And I'm saying that I want to map my container port 5.432 to the host port 5.432, standard Postgres port. And if I want other pods to be able to talk to this pod, I need to set up a service. And here's the service definition. IDDB, kind service. And again, I want the service port 5.432 to be mapped to a container port 5.432. And then the selector says what pods should be in this service. So any pod that's named database will be in this service. Really simple stuff. So now I've got my database set up. Let's do the web. I'm going to have a replication controller because I want two replicas. Again, pulled out a bunch of friends and curly braces and such. And this is actually a lot of stuff. So let's look at it in two pieces. The top part is the desired state for my replication controller. I want two replicas. The replicas that count toward this are the ones that are named web. And then I give a template for the replication controller to create pods. And that's what that template looks like. I've got a single container named web using the image thagamizer to do prod. And I'm passing in some environment variables. And I'm doing some port mapping. If I want to be able to access this replica set of pods with a replication controller, I need to have a service. Here's the service definition. I've got a selector saying anything that's named web is in this service. And I'm doing some port mapping again, specifically putting it on port 3000. So this is all great, but I haven't showed you anything running. So you can run all this. And the Google Kubernetes environment is Google Container Engine. It's in public alpha. And I'm going to show you how to get it running. So this is just something you run at the command line. The first three things, G Cloud Alpha Container is using the Google Cloud Platform command line interface. And I'm saying that I want alpha feature set, because this is alpha. And I want the container engine subset. Cube CTL, it's the Kubernetes command line interface. And I'm going to say create from file that dash f, the dbpod.json. That's that dbpod file I showed you. And it's going to make that. And then I can say, hey, Kubernetes, give me the list of pods. And I get back a list of pods in their state. And you can see that this one's running. You can see what image it is and what note it's been assigned to currently. Great, that's up. So now I can do the service. Again, create dash f, create from file for the DV service. And I can say, Cube CTL, give me the services. And it gives me a list of the services and what ports they've exposed. Great, now let's create the web controller. Again, create from a file. And I can get the replication controllers and see that I have this web controller, the image that it's being used, and how many replicas there are. And then I can go get the pods. And I can see the list of pods that's been started up and what their state is. And now I need to create my web service. And you'll notice that everything is create dash f. I'm just creating all of these from the standard configuration files. There's really not a lot that's complicated here. The first half of the line looks a little scary, but it's the same every single time. So I create my web service. I start it up, and you can see that it's at port 3000. And then I'm going to do something crazy. I'm going to have Kubernetes resize my web replication controller. And I'm going to say I want five replicas now. Wait a couple seconds to a minute. And I have five running pods now. All I had to do was say how many I wanted it to happen. Because Kubernetes' job is to say, what state do you want the cluster in? And I say, this is the state I want. Kubernetes is like, I will figure out how to make that happen. It pulls down images as it needs to. It creates new containers as it needs to. It divides them among the number of nodes. And you'll see that I've only got three hosts listed because the cluster I created only had three VMs in it. I didn't need to provision new VMs to have additional workers running. So at Mountain West RubyConf, Star Horan gave a great talk.  So I would like to think that I haven't lied to you, but there are some large sections of this that I have hand-waved vigorously. And I'm going to call them out right now so that you guys don't have to ask questions about them when I open up the Florida questions. The first one is disk. I didn't show you how to set up the database to hit a persistent disk. So if you restart that database container right now, all your data goes away. You can do that. There's tutorials on how to do it. I also didn't show you how to set a shared disk between multiple web clients. There are tutorials on how to do that, too. This is a 101-level talk. That is not a 101-level concept. Security. I'm not going to say that what I showed you is good for production-level security. Your app has unique security concerns. Please do a security audit. Replication. I didn't show you how to set up a cluster of database machines that replicate across themselves. There are lots of tutorials for this. One of the standard Google Cloud tutorials uses Redis and has Redis Master and Redis Workers that shows how to do something like that. And I kind of talked about this, but Docker runs on Linux machines only. To run it on a Mac, you need a tool called Boot to Docker that uses a virtual box to make a little Linux machine, a little Linux slice where you can run your Docker containers. And it does it well, so I forget the fact that I'm not actually using Docker natively. There's tools for Windows that are the same. You can also just run this on Ubuntu. When I'm at work, I've got an Ubuntu desktop underneath my desk, a big tower, and I do most of my work as a station to that machine. And size. So one of the things I've found talking to folks who do containers and work with Docker a lot is that they're concerned about VM image size. And the images that I chose, the standard Rails image, is huge. If you care about size, you can make your own by taking out the pieces you don't need. For example, I believe the standard Rails image has both Postgres database client libraries and MySQL client libraries. I was only using Postgres, so if I built my own, I could choose not to include the MySQL ones and save some space. But make the trade-off of your time versus how big an image is, and figure out where your laziness actually lies on that. I was going for minimal effort here, which is why I chose those images. So as I said, this is a 101 level talk. A lot of you in the audience have been nodding along, which means I probably didn't show you anything new. But if you want to learn more, first place to start is Shipping RubyOps with Docker by Brian Helmkamp at red.rubyconf 18 months ago, a year ago. This is an awesome hour-long talk on exactly this topic, includes live code demos, because he is more daring than I. I don't do live code demos at a conference because you never know about the Wi-Fi. If you're gonna get into this, I recommend watching this talk first because it will help you internalize the vocabulary. One of the things I struggled with learning this stuff from preparing this talk was that I would pull in a bunch of information and think I understood it and then get stuck. And I would unstick myself three days later once all the pieces kind of sorted themselves out in my head. And I had the answer the whole time, but so much new vocabulary and so much dense documentation was making it hard for me to help myself. And once I watched this talk, I kind of got a big picture sense of how things were and things made more sense. If you wanna find out about Container Engine, cloud.google.com slash container engine slash docs, there are two demos. There's a simple hello world type demo and then there's a guestbook demo and I use the guestbook demo extensively when preparing this talk. If you wanna learn about Kubernetes, that's the Kubernetes website. And if you wanna talk to people who work on Container Engine and on Kubernetes on FreeNode, go to the Google Container's room. The devs actively monitor this. No, really, they actively monitor this. You can talk to the people who are working on this and ask them very technical questions and they will help you find answers. Google Cloud encourages folks to hit up stack overflow, make sure that it helps a lot if your question is tagged so that the appropriate people who are monitoring those tags can answer your question for you. If you run into trouble, let me know and I will make sure someone answers your question. And now time for the sales pitch part. I work on Google Cloud Platform. We have storage, we have VMs, we have App Engine, we have logging and monitoring tools. We have data analysis tools that are awesome and I gave a talk about them at Mountain West RubyConf. Data centers all over the world, internet endpoints all over the world, all the stuff you'd expect for a cloud provider. And at least some of you probably didn't know that you could get a VM from Google before I said these words. And I wanna point this out because this is the really cool part for me. As I've been to a data center and our cloud customers, their code runs on the same racks and the same physical hardware as YouTube as search. I can't tell in the data center what's running on any machine so any work we do to improve the infrastructure for things like YouTube and search benefits our cloud customers as well. We have a free trial because you have a free trial. It does ask for a credit card but you will not be billed unless you okay billing. The credit card is there for fraud protection and a bunch of other legal reasons. And if you have any trouble getting the free trial or you've used your free trial and wanna try something else, come chat with me. I have ways around that but I encourage you to use the free trial because that gives you $200 in credit for 60 days and that's better than I can give you easily at this conference. So thank you. I wanna thank the conference organizers for having me here and for organizing this giant conference. I wanna thank my coworkers who reviewed these slides for me even though they're on the West Coast and so I was sending them slides at inopportune time zone times. When I gave conference talks, I have plastic dinosaurs. Someone told me this looks like just a random bag of stuff. There's actually a bunch of plastic dinosaurs in here that I give away to people who ask questions or come chat with me. I also have stickers up on the podium, right below the podium up here. Lots and lots and lots of stickers. Come get stickers from me. And we've got about 10 minutes left so I'm gonna open the floor to questions.