Who of us will ever know what is in the heart of a dog? This is the story of a great love. The love of a dog for one man. A love that was to prove even stronger than life itself. Keep going. I forgot to clear the shaft of Richard's corpse in the turret. Just wait, you see Frank Blake's eyes. When we tell him he's a millionaire. Call your pup any more, can I fella? Can't call her a fella, neither. Say, that's right. Excuse me, beautiful. Well, how's it going, Jonathan? Shipping me ain't complaining. Steve, has Frank been around tonight? Frank? Frank Blake? Thanks, Steve. Here we are. Jonathan Harvey? That's right. I'm Lynn Taylor. Sorry we couldn't let you know, Jonathan. Martha wanted to, but there was no way of finding in time. Time for what? Frank's dead, Jonathan, over a month ago in the morning. Tommy worries me, Jonathan. Do you know that he's never once cried? If he could just let it out. We'll work it out, Martha. We'll find a way. What about this fellow Taylor? Lynn's a fine man. He's been wonderful. Why did Frank take him in as a partner? He had to. Lynn's buying in when he did kept us from losing everything. I see. Does that make him a partner of grab-stake rights? Yes, why? Jonathan, you've made a strike. I've got something to show you. Jonathan's inside. I'm so glad you're here. Jonathan has something to show us. I found a vein of that. If it's deep enough, it could be the biggest strike this territory has ever seen. That's why we've got to file a claim and a quick file before it's proved. If you file now and word gets out that you struck ore like this, every claim jump in the territory will be in those hills in a week. Before you're sure yourself that you've hit the main vein. I get you're right. 30 years of mud-scrabbling and when I do find the glory dust, I go off half-cocked. Mr. Taylor, Martha's right about you. And right now you can start working and being a partner by lining me up some supplies. Of course, Jonathan. Anything you need. Meet you in the stone a half hour. Good night, Lynn. If it's all right with you, Martha, I'd like to talk a might with Tom. Anything you can do. Oh, Jonathan, why do you have to die? Easy, boy. Some things we can't answer. Lord's got his way of doing things we just can't answer. You didn't want to cry. You go ahead and cry. Do it myself sometimes. Before my tears all dried up on me. Now, how about ship here? Those hills up there, it's for a dog. It's twice, not ship. It is? No, not too lonesome. She likes folks around. Fact is, she just plain ain't happy up there. As for me, well, I'm better off alone.  A bother to you? Ship?  Now, come on, come on up here. You get away. Now, come on, get away.  Will you do it, Tom? Will you? You're no liar, Jonathan. I can't take ship from you. She's your dog. Nobody else is still she dies. Thanks anyway. Look, don't tell anybody I bawled. Will you, please? Honest to Christmas. We didn't do so good. All right, it's Christmas. And given is part of Christmas.  I'll be quiet. And don't look at me that way. That's Jonathan. Merry Christmas, Tommy. Merry Christmas, Ma. Look. Yes, dear, I know. Dear Tommy, I put it up to ship. She agreed with it. She's yours. Merry Christmas from Jonathan. Where is Jonathan? He's gone, sir. Gone? Is it all right, Ma? Can I really keep her? That's what he wanted, Tommy. I'm sure it's all right. Gone with you, Mr. Bald Eagle. What's wrong? I'm sick.  He said dog ship, not it, because she want to go home. To Jonathan? He said dog ship, not it, because she want to go home. He said dog ship, not it, because she want to go home. Thanks, Mr. Bald Eagle. Thanks. Ma, see. Goodbye, Red Wing. Well, hiya. Well, we've got to get her to Jonathan. Please, sir, and take her. Please, Ma. I don't know, dear. How could you ever find him? Shep could. She knows where the claim is. But you still couldn't go alone. I'll take you, Ma. I'll be glad to. Gee, thanks, Mr. Taylor. Hear that, Shep? We're going to take you back to Jonathan. Now you've got to eat and get strong for the trip. Here, take some. You've got to. Shep, what is it? Nothing, what's wrong? The worst has passed. So weak, I couldn't get food any longer. That's what was wrong with Shep. She knew. She wouldn't eat. She made us bring her here. Ma's right, Jonathan. Shep's your dog, nobody else's. So I'm giving her back to you, right now. Never mind the dog, Tommy. Tommy, you rustle up some wood. I'll save out the food. Guess you'll wonder how our partnership's been going. You were right. I'd have been a fool if I had that claim. Bane peed it out in a week. So I just kept working upstream, surfaced up. Hardly worth a man's time. I'll show you. Tommy, go on over there by the shelf. Now slide that chest out. The board underneath will lift up. Look inside, Tommy. How much is here, Jonathan? Oh, not much. Only around about $6,000. $6,000? And plenty more to come. $6,000. You say that's just from gravel? You still haven't found the main vein? No, but it's up there. I aimed to just work upstream until I find it. And I will. As sure as your name's Lynn Taylor. You realize what this means? It means we're rich. All of us. Sure we are, but that's not what I'm talking about. You need help. Now look, I'm starting back to town tomorrow. I'll take this gold and deposit it in all our names. It'll be safe there. And I'll be back. Why, with proper equipment, we can take that gold out ten times as fast. All my life I've waited for something like this. And I'm not taking any chance on losing it now. Send the channel across there and build a smooth spot below the rapid. Let it go, Tommy. Can't you see one day's take from this, baby Taylor? Just wait. But he's out there. Sure, the same fellas you've been here in for three days. You said to yourself there are the prospectors over in Oak Valley. What if they got word somehow that we've hit it? Sure. A little bird flew down and told him. So they came running right back here so they could dig up all our pretty gold right in the driving rain. You may think it's funny, but I don't. And from now on we'll keep in a guard here at the cabin while we're up at the mine. We've got to. All right, Taylor. Then you stand, God. Tommy and me are with the mine. Or maybe that'd worry you too. You'd be wondering if we were losing some of it before we got here. Now, ease up, Taylor. Stop worrying. The richest dust in creation is no blame good if you kill yourself, getting it.  I'm going to. Been watching, guys. But you didn't fool me. I knew you were out there. You heard what I said. Move! Go get what you put in there. Taylor! What's going on here? You keep out of this, John. Johnathan, I know what I'm doing. What are you getting at, don't you?  Make him show you what he put in that saddle bag. I took something from there for this house. He's lying. Look for yourself. Now, Taylor, you look. Who's inside, searching around, snooping. For food? I would have prepared a table in the presence of my friends. This is pilot Pete, Taylor. You've been longer in these hills. You've never made that mistake. Don't make it again. Come on, Pete. Let's see about that something. Hi, sir, Mr. Pete. Regular? No, son. I'm as irregular as it comes.  Me, I ain't got the roots of a tumbleweed. Two things I love above all else. The Lord's mountains and the Lord's centers. So, I spend my time in one looking for the other. And I sure find them. Here, lady. Early shuffle on. She never makes up the strangers. She don't? Here, here, lady. Here, lady. Well, you got her wrong, brother, Taylor. Thou saw us the beast that was and is not. Revelation 17.8. Well, there's plenty of love in this dog for them that loves her. Ain't a ship. Or maybe she just likes my student. Pete. This is from all of us. Well, in his name, I thank you. Jonathan, Tommy, Mr. Taylor, and you, too, Lady Fair. The Lord be with you in all your laborings. Lay not up for yourselves treasures on earth, but lay up for yourselves treasures in heaven. Matthew 6.19. Gabriel. Hi, Mr. Pete. Goodbye, Pete. Goodbye. Work for the night is coming. Work through the morning of work while the dew is waiting. Tommy, you go down to work. I'll be along. You gave him dust. That's a death giveaway we struck paydirt. The old fool talked. He won't. Pete knows the law of these hills, too. And he lives by it. You could try doing the same. And until you do, I'm taking that gun. I keep my own gun. You're edgy, Taylor. Getting worse every time more gold goes under that floor. That ain't just being scared someone will steal it, neither. It's having to split it with Martha and me. You're crazy.  I only get a quarter. And Jonathan gets half. That keeps eating at you, Taylor. I've been watching you, and I know. That's why I'm taking that gun. Now, you won't do that. There's two reasons why you won't shoot me, Taylor. The first, you won't find that vein without me. And the other. The other is just a hunch that you haven't got the guts. It's a description of the claim made out in all our names. Hers, Taylor's, and mine. Is there anything wrong, Jonathan? Oh, this is just in case someone gets the bright idea of filing only in their own name. Oh, Mr. Taylor. Remember, whatever happens, not a word to anyone about my doubt. Even your ma, promise? Send your ma not to worry. I will. Who reels you? You know between us, we gotta take care of that boy. He don't know these trails like we do. Oh, it ain't for good this time. You're coming back. Now go on, get it. I sent Tommy home. The kid's getting lonesome for his ma. What's all the excitement? Jonathan, that vein we've been looking for. If it was up there, what would it look like? Well, no, I'll tell you.  And in it, jackets like lightning, a vein of pure gold. Go, Jonathan, that wine. It's up there, so help me, I found it. It's up there waiting for us. Well, at the head of the canyon way up. Well, let's go. Make things harder for me to explain. Why is come, come here, come stick. With Lillia, come in with us. We've got to go down and see her. Please, Mr. Bald Eagle. Isn't there anything else you can do? Mr. Bald Eagle, you're wonderful. Thanks. Massey. Mama's glad to talk about my house, with Lillia's house. We'll take her to your house. We'll soon well. Don't you worry, ship. I'm gonna find out about that, boys. Nothing's gonna stop me till I do. These hills ain't bare for the weather holds, but I will remember. One good storm could start a slide that would cover the gold forever. On for three days. Where? I don't know, over towards Blue Mountain somewhere. But he might pick us up a dare for a meet through the winter. I heard he's whistling. You couldn't have. Ship must've too, she was barking. Where'd you see ship? Indian kids found her. She was almost dead. Unpoisoned. But she's all right now? Yeah, but I knew Jonathan would want to know, so I brought her back. Mr. Taylor, are you sure he's not here? I know I heard. I told you Tommy's not here. Why don't she come in? I know she's out there. Don't worry about her, Tommy. They're tired and upset. Good night's sleeping. You start home in the morning. Sit down on rest. I'll fit you some supper. You better unsightle my horse, Mr. Taylor. I'll be right back. All right, there's nothing to be afraid of.  You've been scared, Tommy. I know that, and it's my fault. But that's because I was scared too. So scared that I almost lost my head.  Especially if that kid gets the wrong idea in his head. And you've got the wrong idea, son. You lied. You said he was hunting. Yes. Yes, I lied. Because I knew you loved Jonathan, Tommy. Almost as much as your own father. So I... Well, I didn't know how to tell you just like that. Other than his dad's son. He was working up in the canyon and he fell. It was an accident. Two days ago I found his body and... Well, I... I buried it where you saw. I was coming in tomorrow to tell you more. Where's Shepp? Shepp's all right. I saw her outside a while ago. Shepp was like you, son. She got the wrong idea too. So let's both of us forget about what happened tonight, shall we? I guess so. Sure we will. Now you get some sleep and you'll be fine in the morning. Just sleep, son, and forget the whole thing. Mel Steiner and Carl Crane. This runaway come into their camp over an oak flats last night. And I thought I remembered he was yours. They was breaking camp for winter anyway. So on the way into town, figured we'd cut across the ridge and fetch him back. Why, hello there, Tommy Boy. Hi, Mr. Pete. Gee, I'm sure glad to see you. We both are, Pete. Mighty glad. And thanks for bringing the horse back. Sure. Where's Jonathan? It's a good thing you men came along. Come inside. I'm afraid I got some bad news for you. And in thy heavenly kingdom, Lord, let him find peace. That peace which passeth understanding. Let the gold he sought on earth be his in heaven. The pure and shining gold of thy holy grace. We ask it, Lord, in his name. Amen. I'll count on you to explain everything in town. That I will. As long as you can take Tommy and the dog back for me, I'll probably stay on up here till spring. For everyone's sake, I'd like to prove Jonathan was right. You see, he was sure there was real pay dirt here. So far, we've never found it. And Pete, do all you can to help Tommy, will you? You know, kids sometimes imagine all sorts of things, and Jonathan's accident hit the board pretty hard. I'm sure you understand. I do indeed, Mr. Taylor. Pete, he's lying. Don't believe him. Please don't believe him. It wasn't an accident. Jonathan didn't fall. He killed him. I knew he did. Pete, he's lying. He's lying about everything. Tommy, boy, the boys is terrible. He hated Jonathan, and he killed him.  He's lying, Pete. Tommy, listen to me.  Where did you sleep last night?  Well, Tommy, you slept six feet from me the whole night through safe and well. Does that sound like I wanted to hurt you? Answer me. Poisoner, you don't believe me. He said the claim didn't pay out. But it did. There's bags full of gold in that cabin. A dozen of them. If that's true, guess you can show us some. I will. Come on. He's done something with the rest. You better take these back to Martha. I was holding this hoping that I'd have a bigger haul by spring. There is more now. A lot more. Mr. Craig, can't you see he's lying? Mr. Steiner, don't believe him. Please don't believe him. Guess we'd better be going. Please, Mr. Pete. Come on, son.


We turn now to First Minister's Questions. First Minister's Questions 1, Jackson Carlaw. Scotland does not want to be in a separate currency. Does the First Minister agree? First Minister? Well, I think that Scotland should have the ability to choose the arrangements on currency and on everything else that best suits our needs and interests. That's the very essence of independence and it's why I, an increasing number of people in Scotland, support Scotland becoming an independent country. I can say to Jackson Carlaw that I'm always delighted to talk about independence, but there is a constitutional issue that is, I think, more immediately pressing right now. In just 22 days, three weeks tomorrow, at Scotland is due to be taken out of the EU against our will. There is still no sign of an agreement on withdrawal issues, no guarantee of a transitional face and no clarity on our future relationship. Can I give Jackson Carlaw another chance to say something that people might actually want to hear? Will he join with me today in demanding that the Prime Minister stops asking people to choose between catastrophe and disaster and instead takes a no-deal Brexit off the table now? Jackson Carlaw. It's the First Minister's own deputy who has raised the issue of currency this week. Scotland doesn't want to be in a separate currency. I was quoting the First Minister herself just a few short years ago when she and her predecessor were telling us that it was Scotland's pound and nobody was going to take it. Who would have thought, five years on, that the only people who want to take away Scotland's pound would now be the SNP? This week, we've learned from the SNP's deputy leader that their new plan is to ditch the pound and set up a completely new and untried currency. So First Minister, any homeowner who has a mortgage in pounds and overnight their salary is paid in a new untried currency, our mortgage payment is going to go up or down. First Minister. Of course, until a democratically elected Scottish Parliament in an independent Scotland decided to change that, people would continue to use the pound, which of course is Scotland's currency, just as it is the currency of anywhere else in the UK. Jackson Carlaw confidently talks about what people in Scotland want. You know the way to determine what people in Scotland want. That's to allow them to choose in a referendum. Of course, the Tories are so scared that people would choose independence at the next time of asking that they want to block them having that choice. That is deeply anti-democratic. People watching this exchange today, I'm afraid to say to Jackson Carlaw, are thinking about what is due to happen three weeks tomorrow, so let me bring him back to the here and the now. Three weeks tomorrow, this country is due to be taken out of the EU against our will. We still do not know whether there will be a transition phase and we do not know anything about the future relationship with the EU. That uncertainty could be removed today if the Prime Minister rules out no-deal Brexit, so I'll give him another opportunity. Will he join with me today and call on the Prime Minister to end this uncertainty and to rule out a no-deal Brexit at any time, yes or no? Jackson Carlaw. The problem is that this First Minister just doesn't listen. There is no majority support for a second independence referendum. If the currency were changed, here's what would happen. The Fraser of Allander institute made clear an ITV border this week. People would still be tied into mortgages or car loans, but they'd be paying them off in an untried, unknown, as yet unnamed new currency—a clear risk of people paying more. That's the plan that your deputy leader launched this week. Worse still, today we read in the papers that the First Minister's deputy is also plotting another referendum on independence, no matter whether it's legal or not. Another independence referendum is the last thing Scotland needs, so irrespective of the views of her errant deputy, will the First Minister rule out this device of plan? The legal basis for the next independence referendum should be the same as the basis for the last independence referendum. The only reason why we are talking about this issue is the disgracefully anti-democratic stance of the Conservatives, who refuse to recognise a mandate at not just one election but two elections and endorsed by this Parliament. We can always tell when the Tories are in trouble, because pantomime Jackson Carlaw makes a reappearance. The face gets red, the arms get waved about. The fact of the matter is that people in Scotland will have ample opportunity to talk about the many benefits of becoming an independent country, but we don't have too much longer to sort out the mess of Brexit, so I'm going to give him yet another opportunity. 22 days. Three weeks tomorrow at midnight, Scotland is due to be taken out of the EU, and we still don't know what follows from that. That could be taken away, that uncertainty if a no-deal Brexit is ruled out. For once in his life, will Jackson Carlaw stand up to his bodies at Westminster and will he join with me in calling, demanding that the Prime Minister rules out a no-deal Brexit and that she does it now, with no further delay? Jackson Carlaw. The whole chamber knows that in two short years Ruth Davidson will be sitting where the First Minister sits today, and a Scottish Conservative First Minister will be answering questions for a long time to come, but for the moment this First Minister remains in office. In summary, the SNP is preparing to launch a new currency according to its deputy leader, which would throw people's mortgages and Scotland's economy into chaos. Then, according to her deputy leader, with whom she is now disagreeing publicly, the SNP plans to launch an illegal referendum within a matter of weeks. Another week of the SNP showing that there is only one priority for this Government, and that is satisfying Nicola Sturgeon's obsession with a second independence referendum. Enough is enough. First Minister, just roll it out and let Scotland move on. At the start of that latest chapter in the pantomime, Jackson Carlaw actually had the good grace to laugh at himself.  I was going to say that Jackson Carlaw has lost the plot. I am not sure he ever had the plot in the first place, but let me tell Jackson Carlaw what my obsession is right now. It is saving Scotland from the disaster of a Tory Brexit. I do not know how Jackson Carlaw plans to spend the rest of his deal. Let me tell him how I will be spending the rest of my day. This afternoon, I will be chairing a meeting. Jackson Carlaw might want to listen to this. I will be chairing a meeting of the Scottish Government's Resilience Committee. What we will be looking at is how, just three weeks from now—three weeks tomorrow—we can secure medicine supply in Scotland, how we can secure food supply, make sure that people in Scotland still have food on their table. We will be looking at how we can protect our economy from the risk of being plunged into recession, all that time, effort and expense, because a Tory Prime Minister refuses to rule out a no-deal Brexit. It is shameful that the Scottish Conservatives have not demanded that she do so. I have been wondering why the Scottish Tories are as fine as they are. Perhaps it is because they do not want to stand up for Scotland and never will stand up for Scotland. An independent Scotland will keep the pound because it is in everyone's best interests, and to try and suggest otherwise flies in the face of the facts. That is what Nicola Sturgeon said in 2013. First Minister, if that was true then, why isn't it true now? Can I have some quiet please for the questions and the answers? Nicola Sturgeon, I will share a quote with the chamber. People in Scotland need a strong party of Labour that speaks for working-class people in working-class communities, and they are not doing that. Richard Leonard's strategy is a recipe for failure. That is Gary Smith from the GMB on Scottish Labour. Maybe it is about time Scottish Labour stopped being a pale echo of the Scottish Conservatives and actually started standing up for Scotland as well. Let me ask another question. Last night, the SNP finance minister, Kate Forbes, told the BBC that the currency that you used the day before independence will be the same currency that you used the day after independence. But under your plans, First Minister, that simply isn't true, is it? Because what Kate Forbes left out last night and what you've left out in your answer is that you plan to use the pound without a central bank. It's the SNP's very own no-deal exit, and that would mean building up substantial foreign exchange reserves. The finance secretary, Derek Mackay, could not tell the chamber yesterday afternoon how much that would cost, but the people of Scotland deserve an answer, so this afternoon, can the First Minister provide us with an answer? The position of Labour and the Tories on those questions is utterly ridiculous. Remember, in 2014, they told us that an independent Scotland couldn't use sterling in a currency union. Now they tell us that we can't use sterling without a currency union, and they tell us that we can't have our own currency as well. Scotland must be the only country in the entire world that couldn't have any currency. It is ridiculous, and the people of Scotland know that. So let me tell Richard Leonard exactly what the position is. Richard Leonard will be in an independent Scotland. Until a democratically elected Scottish Parliament decides otherwise, we will use the pound, which is our currency, just as it is the currency of other parts of the UK. Richard Leonard is asking questions about independence. I'm happy to talk about independence any day, but people across Scotland are worried right now about Brexit.  Will Richard Leonard join with me now, not just in calling for no deal to be ruled out, but calling for people to have a chance again to reject Brexit? Will he do that today? I will do that, and I said that on Tuesday afternoon, but the answer, Presiding Officer, to the question that I asked, is that £40 billion of foreign exchange reserves would be required. That's before we look at the reserves needed to ensure bank deposits, and that's before Derek Mackay's austerity programme to have the deficit in five years. That's not just a programme for austerity, that's a programme for turbocharged austerity. At the very time when the people are crying out for investment, First Minister, this isn't about the best interests of the people of Scotland, is it? It's just about the best interests of the SNP. If Scotland was independent right now, we wouldn't be facing three weeks tomorrow being taken out of the European Union against our will. Right now, it is because Scotland is not independent that we have to put up with a Tory Government that we didn't vote for. It is because Scotland is not independent that we face being ripped out of the European Union against our will, and perhaps until Richard Leonard and the Scottish Labour Party find it within themselves to stand up for Scotland instead of standing up for the continuation of Tory rule, they will never recover in Scotland and they will never deserve to recover in Scotland. We've got some constituency supplementary questions. The first is from Angus Macdonald to be followed by Jeremy Balfour. Angus Macdonald The First Minister will be aware that yesterday administrators were called in to Grangemouth College firm Duncan Adams, which has operated in the port for nearly 60 years. 132 employees were made redundant yesterday following the devastating news, with 12 being retained short-term to assist with the closure of the firm. The priority in the immediate term clearly must be focused on supporting the staff and their families through this difficult period. Falkirk Council has been in touch with Skills Development Scotland regarding pay support and Unite the Union has arranged an advice session for the workforce on Sunday. Will the First Minister help to ensure that everything that is possible is done to provide follow-up support to the families that are affected and also ensure that plans are in place to avoid a backlog of containers at the port of Grangemouth? I thank Angus Macdonald for raising this important issue. I was very concerned to learn of the development at Duncan Adams College and the impact that it will have on the workers, their families and, of course, the surrounding communities. I can confirm that through our PACE initiative we have already been in contact with the administrators who have agreed to issue PACE guides to all 144 employees. PACE representatives will also attend the meeting on 10 March at the Lee Park hotel in Grangemouth, which has been organised by Unite the Union and is open to all redundant employees. The local PACE team is considering what further support can be provided. I can also confirm that we are in touch with the Port Authority to assess the impact on port operations. I will be very happy to ask the minister involved to keep Angus Macdonald fully updated. To ask the First Minister if she would agree with me that no decision should be made by the City of Edinburgh Council to extend the Edinburgh Tram network until the findings of the Edinburgh Tram inquiry are published and all lessons learned. I think that decisions of the City of Edinburgh Council are actually for the City of Edinburgh Council to take. I am sure that it will take account of all relevant factors. It is important that the inquiry concludes that it is important that any lessons that come from that inquiry are learned, but I know that the Scottish Conservatives used to demand that the Scottish Government did more to support localism. I am going to do that today, even if they have changed their mind and said that matters for the City of Edinburgh are for the City of Edinburgh to determine. Tavish Scott is to be followed by Bob Doris. Air traffic controllers employed by a company owned by the Government and who operate across the Highlands and Islands plan to strike next month. I am sure that the First Minister will recognise that that would stop air travel and create tremendous disruption for passengers across the network, including those who are potentially flying to hospitals for hospital appointments. Could she set out to the Parliament what her Government has done on this matter and what they now plan to do to make sure that this strike does not happen? It is, of course, disappointing to hear about planned strike action. Highlands and Islands airport, of course, is covered by our public sector pay policy. Hile has implemented a pay rise for all staff, which is a significant improvement on previous years. It has also significantly increased its contribution to the pension scheme in order to maintain the benefit for employees. In addition, ministers have authorised Hile to develop a retention allowance as part of the air traffic management 2030 strategy programme. I hope that we can see strikes avoided, and I encourage the union and Hile to continue to work together to resolve the outstanding issues. Bob Dorris will be followed by Alex Rowley. The announcement of 120 redundancies in looming closure of Jim and I rail in my constituencies has a devastating blow for a skilled and dedicated workforce. Jim and I rail have been inflexible, unimaginative and slow to engage, meaningfully in our efforts to retain jobs and operations. Will the First Minister commit to continuing to explore all options to support workers to retain jobs and operations at the site? On which point, First Minister, I would stress that, if spring burns to win the ScotRail 170-class tender, work that Jim and I rail have staggeringly still failed to bid for, it would provide 30 jobs for three years and potentially kickstart a rail we have model that the Scottish Government is currently exploring. First Minister. Can I again pay tribute to Bob Dorris for the way in which he is representing the interests of his constituents and agree very much with the latter point that he made? I was extremely disappointed to receive a letter from Jim and I rail yesterday confirming the closure of the workshops at spring burn. I know that this will be a very concerning time for workers there and their families. However, I want to stress this point. We believe that consideration still needs to be given to potential options for keeping the site open. There will be a further meeting of stakeholders at the end of this month to discuss the way forward. The workshops have worked to complete on vehicles leased to ScotRail until July this year. Jim and I rail has retained the lease until March next year. That means that there is time to work with industry with a view to repurposing the site for future rail use. To that end, Scottish Enterprise has already engaged independent financial advice in reviewing Jim and I rail's model for the site. We will keep members fully updated with any progress. Alex Rowley. The BBC is reporting this morning that BiFab has lost out for offshore platforms to Yards in Belgium, Spain and the United Arab Emirates. The United and GME unions are calling for a committee of inquiry in this Parliament. They say that billions of pounds worth of contracts and thousands of direct and indirect jobs are going to be lost. They are now on the brink of being lost to state-sponsored companies and companies who hold an unfair commercial advantage or economies that do not apply to labour standards that we would recognise. That is not a level playing field. What further steps will the Scottish Government take to secure long-term future for the five yards, and do you accept that we need more direct-state intervention to ensure a just transition in our economy? First Minister. Yes, I agree with that last point, which is why, of course, we have established a just transition commission in Scotland on the recommendation of the STUC. It is important to recognise that notwithstanding the real challenges that are being faced, BiFab today would not even exist had it not been for Scottish Government intervention. Although there are big challenges for the five yards, of course, we had the good news about Arnish earlier this week. I indicated some of that last week. I absolutely share the concerns that have been expressed by Gary Smith of GMB and Pat Rafferty of Unite the Union. The concerns that BiFab may be facing unfair challenges in securing other contracts. I want the Scottish Government to work with the unions to fully explore that. I intend to convene a summit in early course to do so. We have worked extremely well with the unions and intend to continue doing so. In the interim, of course, we will continue to do everything that we can with the unions and with the owners of the yard. Of course, the Scottish Government has a stake in the yard. We will do everything that we can to help to secure work, not just for Arnish but for the two yards and five as well. I hope that we will have the support of the whole chamber as we do so. Thank you. Young people are twice as likely to be injured on our roads. Some parts of Scotland have made their streets safer, healthier places, including here in Edinburgh, where a 20mph speed limit has been rolled out across the city, and in Fife 2, where more lives are being saved and children are protected from injury, particularly in low-income areas. Does the First Minister share my concerns that too many communities are not benefiting from the small change that would make a big difference when it comes to tackling the health inequality that continues to blight Scotland? First Minister, I will take the opportunity to welcome Alison Johnstone to FMQs. I think that it is great to have her asking questions. I recognise and share her concerns about the statistics that she has cited today. Many local authorities already have 20mph speed limits in certain areas, and I encourage local authorities to consider that where they think it is appropriate. Of course, I understand members' legislation about to come through this Parliament. Of course, the Parliament will debate that and the Scottish Government will continue to listen to all the arguments that are made. I appreciate the First Minister's response. The Scottish Government has made some brave and important public health interventions, such as banning smoking in public places, introducing a minimum price for alcohol. However, those policies are effective because they apply a national level with government leadership. The piecemeal approach will not deliver what I know both I and the First Minister want, which is all children, to have safe streets. The health and safety of our children cannot depend on which part of the country they live in, so will the First Minister join organisations, including NHS Health Scotland and the Royal College of Pediatric and Child Health, and back my colleague Mark Ruskell's 20mph bill, a public health measure that will have the greatest impact where it is most needed. I can give an assurance that we will listen very carefully to the arguments that are made as Mark Ruskell brings forward his bill, and I commend him for raising this issue in the way that he is doing. I think that Alison Johnstone is right, and this is an issue that, in government, we grapple with all the time, showing national leadership on an issue, which, as Alison Johnstone has said, we have done on a range of public health issues in particular, but we also respect the autonomy of local councils, which is something that people across this chamber call for on a regular basis. It is important that we get that balance right, but paramount importance has to be attached to the safety of children. I absolutely commit to listening carefully to those arguments, as I am sure members across the chamber will do, so that I would very much hope that the Parliament reaches the right decision on that, so that we get that balance right. Some further supplementaries, the first from George Adam, to be filled by Maurice Corry. George Adam. Thank you, Presiding Officer. Is the First Minister aware that global radio, who operate heart, capital and smooth radio in Scotland, planned to create a virtual radio network to compete with BBC radio 1 and radio 2 using local licences to do so? Does the First Minister agree with me that off-com must become involved and keep local commercial radio in Scotland local? I am a great supporter and fan of local radio, so I think that its place in our broadcasting environment is very important. I hope that off-com would take into account all of the very reasonable points that George Adam has just made. Maurice Corry, followed by Willie Rennie. On Monday this week, my constituent Mr Phillips, an armed forces veteran, collapsed from a suspected stroke. He waited just under six hours for an ambulance to arrive at his home, Moghau, after which he was taken to the Queen Elizabeth University hospital, where he waited a further five hours before he was seen by a doctor. He spent the night in the receiving unit as there were no beds available. Does the First Minister agree with me that this is an unacceptable level of time for anyone to wait for an ambulance and an assessment from a doctor, let alone someone who suffered a stroke? Will she look into the matter with the utmost urgency? Yes, I agree that, on the basis of what the member has narrated, that is unacceptable. If he wants to provide greater detail of his constituent's case, the health secretary will be very happy to look into that. What I am about to say does not take away from that particular case and the unacceptable of what has just been described. Our ambulance service do a fantastic job day in and day out. Our accident emergency services, although they face considerable challenges, remain the best performing accident emergency services anywhere in the UK. I think that all of the staff who work so hard to deliver that performance deserve our grateful thanks, but we would be very happy to look into the individual circumstances. Willie Rennie to be followed by Jenny Marra. This morning, the UK Statistics Authority reprimanded the First Minister for the misuse of statistics in response to my question to her at last week's First Minister's questions on NHS waiting times. The letter states, waiting times are a major concern to patients and their families. The statistics informing debates about them must therefore be trustworthy of suitable quality and useful. We are therefore extremely disappointed that it has been necessary for us to intervene in this way. This is the second time that this has happened recently. Will the First Minister therefore take the opportunity to apologise to the chamber and to the country for misusing statistics in this way? As the Government always will reflect very carefully on anything that the Office for Statistics regulation says, the statistics that I used were a, accurate, and as I understand it, they are statistics that are available to anybody on request, and statistics that will be published by ISD. Of course, it is not the Scottish Government that decides what statistics ISD publish and do not publish. It decides that. I hope that we can have as much transparency and as many comprehensive statistics as possible, because that would demonstrate that the NHS is, in so many different measures, the best-performing NHS anywhere in the UK. Jenny Marra to be followed by Shona Robison. The First Minister Presiding Officer, there are still electrical apprentices from McGill, the firm that went into administration after failure of this Government to provide a modest loan. There are still apprentices in Dundee trying to salvage their apprenticeships. This country's skills situation cannot afford to lose apprentices, and I am not convinced that Skills Development Scotland from the representation that I have had from constituents are doing all they can. Can she guarantee me today that her minister will follow up every McGill apprentice to make sure that they secure another place to complete their apprenticeships? We will do everything, as we always do, in redundancy situations to make sure that apprentices are placed and are able to continue their apprenticeship. Skills Development Scotland works extremely hard to do that. If Jenny Marra knows of anybody who needs further assistance, she should bring those people to us so that we can ensure that that assistance is there. That is, of course, Scottish Apprenticeship week. Right across the country, people have been celebrating the success of Scotland's apprenticeship programme. A few years ago, there were something like 10,000 modern apprentices in Scotland. Today, that is 27,000 as we work towards a 30,000 target. That is a success story, and we will continue to do everything we can when companies regrettably fail to make sure that apprentices do not pay the price of that. That is an absolute commitment that the Scottish Government will always honour. Does the First Minister share my concern that, in the week that we celebrate International Women's Day, we have seen the creation of a video game entitled Rape Day, which enables players to verbally harass, kill and rape women as they progress through the story? Although it is positive news that the gaming platform Steam has decided not to distribute and sell this game, does the First Minister agree with me that we should send out a clear message to other game developers and platform providers that such games have no place in our society in this day and age? Does she think that it is time for the UK Government to review the regulation in this area? Yes, I do. I pay tribute to Shona Robison for highlighting the issue this week. The Rape Day video game is absolutely sickening and appalling. Violence against women, sexual or any other form of violence against women is not a game and should never be treated in such a way. It is serious and must be treated in that way, so I hope that the game is not promoted. However, the game should not be down, in my view, to the individual decisions of companies. I think that it is time for the regulations governing the game to be reviewed. Perhaps this is something that the whole chamber could unite on and call on the UK Government to do without any delay. To ask the First Minister what the Scottish Government's response is to the UK Government's stronger towns fund. To be honest, it is hard to know what our response should be, because the UK Government has been unable to confirm any details of the funding implications of this announcement for Scotland. We will continue to press the UK Government to ensure that Scotland receives its fair share of any additional funding. As with so many things related to Brexit, the UK Government's plans are, frankly, as clear as mud, but it suggests that Scotland is continually being shortchanged. Can I thank the First Minister for her response and acknowledge the point that she makes about so much of it being unclear? Does she share my concerns about the exclusion of Scotland in Wales from the Prime Minister's Brexit bung? Does she agree that this is yet another example of the failing fiasco of Tory Brexit, which one of her own Tory cabinet ministers said was like hitting an iceberg, and which is only surpassed by the complete inadequacy of the 13 Tory MPs from Scotland, each of whom represent a constituency that voted to remain in the UK and the affair to stand up for Scotland? The First Minister. Those points are important. Not only do we have no clarity on the stronger towns fund or whether Scotland will get any share, let alone a fair share of that, we still have no clarity regarding the future of structural funds or the so-called shared prosperity fund. We have also heard that the UK Government is to provide an additional £140 million to Northern Ireland, but with no indication of equivalent consequential funding for Scotland or for Wales. We welcome the additional funding for Northern Ireland, but there must be confirmation that Scotland and Wales will be treated fairly. In sharp contrast to the Brexit bung of the Prime Minister, this morning, the Scottish Government has announced the projects that will benefit from our £20 million regeneration capital grant fund. It is not money to persuade anybody to vote for anybody, but money to ensure that the regeneration of communities is the length and breadth of Scotland. That is a Government that is getting on with the day job, and the UK Government could learn lots of lessons from it. To ask the First Minister what action the Scottish Government is taking to help people who have bipolar disorder. Bipolar disorder is, of course, a very serious mental illness, and we want everyone in Scotland to have access to effective mental health services when they need them. That is why we have set out in our programme for government a £250 million package of measures to do more to support positive mental health and prevent ill health. The funding for a package of new measures comes in addition to £150 million of investment over five years, already under way to support delivery of the mental health strategy. In addition, we are providing support to Bipolar Scotland, which provides information support and advice for people affected by bipolar disorder and those who care for them. I thank the First Minister for that answer. Bipolar disorder patients in Scotland are receiving treatments such as antidepressant monotherapy that are at best ineffective and at worst detrimental for long-term outcome, according to Professor Daniel Smith from Glasgow University. Lithium, on its own, is the recommended first-line treatment for bipolar disorder because of its proven effectiveness in preventing episodes of depression and mania. However, it is prescribed to only one in 20 patients. Can I ask the First Minister what action her Government is taking to address this important issue? Will she agree with Alison Kenes, the chief executive of Bipolar Scotland, that we need to see more patient-clinician partnerships in Scotland? Yes, I agree with that. The Scottish Government expects all patients with bipolar disorder to have access to appropriate and evidence-based treatments with individual prescribing decisions, of course, made by clinicians but made in partnership with their patients. We have set a national standard in Scotland to outline the monitoring requirements of people treated with Lithium, and details of that were sent to health and care services in June 2017. Using that benchmark, we can improve the quality of care and treatment that we provide, improve patient safety and reduce what is an established health inequality. Individual health boards, of course, will determine how best to undertake this monitoring, but it is very important that it is done. First Minister, whether the merger of Police Scotland and the British Transport Police has been permanently abandoned? First Minister. We remain committed to the devolution of railway policing, as agreed by all parties in this Parliament during the Smith commission. We have worked with stakeholders on options to improve the accountability of railway policing in Scotland. There is consensus that legislation currently enforced could be used to create an arrangement that facilitates a stronger role for the Scottish Police Authority. The SPA and the British Transport Police Authority are considering how that should be done, and they aim to present proposals to their respective boards in the coming months. It would be premature to rule out any option at this time, but any proposal must enhance the accountability of railway policing in Scotland while ensuring the safety and security of the travelling public. Daniel Johnson I thank the First Minister for that response, but after almost two years and hundreds of thousands of taxpayers' pounds being spent trying to find a way of achieving integration of BTP into Police Scotland, it is clear to everyone, if not the First Minister, that it is simply not possible. The uncertainty that staff and officers have faced will not end until full integration is permanently ruled out. I ask the First Minister to take the opportunity now to go beyond the letter that was sent to staff and officers this week saying that they will not transfer and confirm that the plan for full integration has been permanently scammed. We will take the opportunity to confirm when the repeal of the fatally followed railway policing act Scotland will take place. The First Minister I think that Daniel Johnson recognises that this is a challenging piece of work, it is a complex piece of work and considerable work has been done to assess all the risks and challenges. We have engaged with stakeholders throughout this process. A stakeholder engagement event was held in November to explore all options. The option currently developed, of course, will see a new committee established to oversee railway policing in Scotland, which would comprise members of both the Scottish Police Authority and the British Transport Police Authority. Both of those authorities have been working closely on the proposed terms of reference for that new committee. They are making good progress on that and it is hoped that they will be in a position to present proposals to their respective boards in the coming months. I will give an undertaking today that the Cabinet Secretary will update Parliament once those negotiations are concluded. I think that that is the right way to proceed to make sure that we have arrangements in place that do enhance the accountability of railway policing in Scotland, which I hope all members would want to see, but also ensuring the safety and security of the travelling public and, of course, those who work in our transport police as well. Liam Kerr, to be filled by Liam McArthur. At the outset, I would like to thank all the officers, staff, experts, academics and colleagues from across the chamber for forcing the SNP to concede that erecting a border on Britain's railways is a dreadful idea. Can the First Minister tell us how much taxpayers' money has been wasted pursuing full integration thus far? Will she admit that control room infrastructure cannot be replaced on the cheap? At least we know that we have trains when the UK Tory Government likes contracts for ferries. They do not check that they have ferries to do it, but seriously, this is a serious issue. I would also pay tribute to those who work in our transport police, but the Tories here are not exactly in a consistent position. The Tories in their 2016 Scottish election manifesto actually advocated merger. Let me quote it. We will create a national infrastructure police force, bringing together the civil nuclear constabulary, the Ministry of Defence Police and the British Transport Police to improve the protection of critical infrastructure. The idea that the Tories have always supported retaining the British transport police as a stand-alone entity is, I am afraid, not supported by the evidence or the facts. That is the case. We will continue to take that forward in a proper way. I think that the work that is being done now is extremely solid. When that is concluded, the cabinet secretary will come back to Parliament to update members in the usual way. A recent academic paper by Dr Kath Murray and Dr Colin Atkinson concluded, while cutting losses at this stage will carry short-term political and reputational consequences, such a decision would stem the escalating financial, professional and personal costs. Years were wasted on the full integration model, so why will the First Minister not take this opportunity now to rule out that option for good? I have already set out to the chamber, as the cabinet secretary has done previously, the work that has been done to get to the right solution. I think that it is important that that work continues. In the interests of balance, given that I have just done it with the Conservative manifesto, the Liberal Democrat manifesto in 2016 said that it would, and I quote, transfer control of the British transport police to Police Scotland, but seek to retain the ring-fenced expertise of officers on transport-related matters. I have read out the full extract. The fact of the matter is that parties are not necessarily taking the same position now as they did previously, but that, of course, is history. What is important now is that we get this right and we will continue to support the work that has been done to ensure that that happens. John Mason, to be followed by John Finnie. I wonder if the First Minister would accept that the ordinary constituents in my constituency do not understand why there should be one police force for the street outside the railway station and a separate police force for the railway station itself. My ordinary constituents want a much more joined-up approach than we have had in the past. John Mason makes an important point, because whatever our individual views are on the best arrangements, I suspect that most members of the public would simply want politicians to sort out the structures and arrangements so that they can have confidence in their police wherever they need the services of those police. Of course, if there are, for example, terrorist incidents on a transport network, it will often be police Scotland's resources that are brought to bear to help with the resilience in those cases. It is important that we have greater accountability for the British transport police and that we have as much integration around use of resources as possible and that we put the right structures in place to support that. That is what we are working towards doing, and we are determined to get it right in the interests of everybody, those who work in the service and those who use the service as well. Does the First Minister share my concern that there are hundreds of police officers in Scotland who can exercise the power of arrest in our citizens and enter and search their premises, but they have no political accountability in Scotland? The point about accountability is one that I have made on several occasions already today. It is important to improve the accountability to the Scottish arrangements of the British transport police. That is one of the motivations behind the work that is under way and why it is important that we allow that work to reach a conclusion. Thank you very much, and that concludes First Minister's questions. We are going to move on shortly to members' business in the name of Animal Ewing on settled status scheme for EU citizens in Scotland. We will just take a short suspension to allow members and ministers and the gallery to change seats. A short suspension.


Good afternoon, so I want to talk about some of the decisions you have to make about Along the way of your good ops journey and some of the Consequences of those so I'm not gonna talk about any particular products.  There's CI There's get ops. They're all a little different So, you know for the purposes of this talk when I'm talking CI I'm talking about building your code to gain it in an artifact repo unit tests test automation, etc And I'm talking continuous deployment. Hey, this requires continuous integration, but it's not the same thing So this is all about how do we get it the rest of the way into production? How do we actually get it on the right clusters make sure everything deploys safely in the expected way? And when I talk get ops talk about how do we make sure that people aren't doing this by hand? How do we make sure all of this lives in change control? We can audit who did what we can easily roll back So if you think about it, you can't do continuous deployment without doing continuous integration You can technically do get ops without doing either of them So, you know, I the very first time I saw a team doing something I would classify as get ops Except for the fact that it predated get They were they were maintaining all of the the deployments in source control But, you know, they had customer specific deployments. It was a pertinent, you know pertinent application and Someone went in and modified a file and get when a customer needed an upgrade Was it continuous deployment where customers upgrading and getting features immediately? No, but it was get ops So these things are all related, but they're not the same Personally, I think that there is a happy path a lot of companies want to get to where they're doing both continuous deployment and get ops Some examples of where you might be doing one, but not the other. Hey get ops has the word get in it in its name If you're not using it, you're not doing get ops. So if you're on mercurial not doing get ops It also a lot of people Consider get ops to require that your configuration is declarative. This is something I happen to be a big believer you know if you're Checking in a script and if you modify that script everything breaks Probably not really doing get ops the way you want to be doing it so your your configuration of what you are deploying should be in a declarative fashion and You know similarly you might be doing get ops and not be doing continuous deployment if you're doing, you know a bunch of manual processes in the middle you're you know doing different repos and You know it's three months in between the original feature being committed and it actually being deployed to some some environment In the happy middle ground You know all your configuration and source code isn't get and I mean everything your infrastructure is managed to code to your deployments are managed to code everything is and It's all declarative If you're in the middle when you check in a feature it gets everywhere does it just update your dev environment doesn't update staging Updates staging runs your integration tests updates production updates all of your regions So that's kind of the the middle ground that from what I've seen a lot of people Want to be trying to reach so we're gonna talk about some of the problems I see people encountering along the way when they're trying to get there so the first thing I want to talk about is repository structure and The reason I want to talk about this one is I can't tell you how many people I have talked to Who are like I just like XYZ tool and you start talking about why and it's not actually a problem with the tool It's how they configured the tool so Back before get ops was a thing back for DevOps was a thing We came up with a branch management pattern called get flow and it was originally developed for long running Long running releases you need to maintain So, you know if you have five versions you need to maintain for two years in parallel it's a phenomenal way to manage your branches and When when DevOps came around everyone was familiar with this way of managing branches so they started going well, I can do a branch per environment and It looks really really good on paper if you're a small team everything simple works. Okay Bigger you get the more people the more cooks you got in the kitchen the more likely it breaks some some examples of how it breaks Imagine that you're using branches and You want to run different number of replicas in the staging environment versus a production bar, okay? Someone changes the image version Merges to staging When you go and you merge it to production it goes and picks up the replicas set The replica count change another person made and you didn't even realize it So, you know when you start doing branches per environment it can cause a lot of pain It causes so much pain the creator of get flow actually went back to the original blog where they published it And they wrote a disclaimer saying don't use this pattern for this It's not what it was intended for Personally, I'm a big fan of trunk-based development. There's a few other alternatives out there as well, but you know Check in your build on feature branches check them into main when you get to main Go ahead and ship that off to all the environments So, hey, what's the alternative to a branch per environment? My personal recommendation is make a folder per environment in your repo I say a folder not a file for a very specific reason. You don't know what the future holds So, you know if you're using helm you might be like hey, I've I can just you know I've got a values file per environment I can have one name prod one name staging two years from now if you suddenly have another file that you need You're gonna have two files with that staging it gets you don't know how it's gonna grow just thinking a folder. It's easy grows better and you know the other thing I'd recommend is there are a whole bunch of really good tools out there for Doing templating for YAML templating for JSON templating for XML These two are really common in Kubernetes if you're using something else I guarantee there is template a template generator for it So, you know use tools like helm and customize they allow you typically to have All of the definition of the application be shared, but then have parameters per environment So you can go and you can have a file in those folders For each of those environments and suddenly everything's going to be a lot easier to manage The other the other one I see a lot of people Struggle with and sometimes wind up regretting their decision on Doesn't have nearly as kind of dry of a A versus B trade-off in my opinion and that's how you structure your git repositories so you know some people go and they put their applications their infrastructure code all in one repository some of them do a separate repo per app or an app repo and an info repo and My best piece of advice here is ask yourself.   You can more easily set up different permissions per so ask yourself where you are now, but then also ask yourself where you think you're going to be in three to five years because Restructuring repos kind of sucks Don't want to have to do it You know, you know your company's growth trajectory if you're you know building a consumer cell phone app You're probably not going to wind up having a bunch of heavy info seconds if you're a 10-person fintech startup You probably are going to wind up needing those those separation of concerns in the not too distant future The next pattern that's out there that I want to talk about a little bit is push versus pull so The difference here is when I check in that configuration change to get how does it get applied? Is there an external system somewhere that's like monitoring my get repo or? Is like you know my CI system kicking off a deployment job there are two fundamentally different patterns Some of you may not be familiar with both, so if you use kubernetes There's a bunch of kubernetes tools that use pull, but there's very little that uses the pull model outside of kubernetes today It's kind of the newer one so some of the advantages of Push is it's been around longer. It's a little bit simpler more people understand it and One of the things I really like about it is it leaves you with the full full power of your CI systems so you know if you are deploying something and you need to run like Why Q to like change one thing as part of your build script you can and it's it's really easy When you're doing a pull model oftentimes going and doing scripted changes to config can become more complicated The other thing I like that is it's cross-target, so if you're only deploying to kubernetes Hey pulls not a problem if you're deploying to five or six different things and One of your tools is pulled and everything else is push that suddenly means your app devs every time they have to touch one of these tools is having to completely change their rental model and You know the more Things work in the same way the easier it is to get your job done I suspect a lot of people in this room are you know on an SRE teams think of the app devs as your customers and you know The more familiar things are to them the more productive they're going to be the happier your customer will be There are some disadvantages of push so there are push systems out there that require things like You load external secrets into github. They require internet access to like a kubernetes cluster. That's a problem If you need external secrets use the secrets mantra, don't check it into your get repo. I everyone should know that but Also, take a look at how it connects to your cluster because you know a lot of companies when they start when they're 10 people Maybe you can get away with having your your kubernetes clusters API endpoints Internet accessible, but like it's not going to last and you don't want to be poking holes in your firewalls for it So like how you actually connect the API's you're deploying to back to your get repo is a meaningful problem And whatever tool you're using make sure it's got an answer for that you know on The push model there are tools that you know run in the cluster connect back and then You know have frameworks where you can trigger it on the pull model Hey, they're they're connecting to your get repo and pulling from it. So as long as your get repos internet accessible You're usually fine Some of the other disadvantages of the pull model it Tends to have a large amount of Business logic that you need to manage on the system that is applying your configuration. So One of one of the One one of the interactions I had with customer once the kind of opened my eyes on on one of the problem on this problem it was a large bank and they were trying to upgrade a pull model based deployment system for four months and like that sounds conceptually easy, but the problem was they had 400 clusters they had four different versions of this thing running and all of the versions treated the configuration slightly differently So anytime they tried upgrading any cluster. It broke someone else's config so they couldn't get all the different teams on a single version that actually worked the same across everything so Make make make sure you think about that So the next thing I want to talk about is automated validation So we talked a little bit about get ops versus continuous deployment a lot of the tools in the space support both My advice if you want to get to where you're doing full continuous deployment everything fully automated and not just get ops You want to make sure that the tool you are you the tool chain? You are using has an easy answer for how it orchestrates deployments and testing across multiple environments You know very few people deploy to production immediately when someone checks in they tend to deploy to you know pre-production environments They tend to run integration tests. They run to tend to run security scanners. They only go to production if those pass There are a lot of tools that How do you know when it finished updating so like if you're on that pull-based model and it went and it Updated staging. How do you know it's time to go run the integration tests that need that environment to be deployed? You know some of the tools have answers for that some of them don't if it doesn't have an answer you're gonna have to build it yourself So make sure you think through that some of the push-based Systems you're having to go in like monitor and wait for that deployment to finish You know pulling constantly get have actions if you're if anyone's using it You know charges you by the minute of execution time. You don't really want to be pulling and waiting So you know make sure that you know not only can it tell but it can tell in a way That's like a reasonable and not going to cost you an arm or leg some examples of The classes of tests you want to run some of the security scanners So you know I assume everyone uses like you know docker image scanners and static code analyzers That's not what I'm talking about when I say security scanners If you look at like the the OOS scanners a lot of them needed deployed environment to run And basically just like scan even the even the full web server So those are the ones that you tend to need to mix in to your deployment pipeline There's also end-to-end test smoke tests, you know selenium And all all of that stuff tends to need everything deployed talking together Another thing that is in my opinion at least extremely important if you want to get all the way to CD at least if your product Like if stability is truly important to you for production and should be It really should be important to everyone who's here is When you are deploying to production, how do you make sure that if there's a bug you haven't found yet? You can detect it and automatically roll back so a decent percentage of tools but not all of them have Things beyond just you know, hey shut down all of production install the new version turn it on or an all at once Update and a decent percentage also have things beyond like a rolling update, which is the default strategy for gubernet ease you know rolling update basically like updates one pot at a time and There's strategies beyond that So I'm going to talk about two of them the ones I'm going to talk about our canary deployments and blue-green deployments Which are basically strategies that help you both in the case of canary deployments decrease the blast radius of How many users are going to be affected by your deployment and in the case of blue-green deployments lets you actually validate that the Specific copy of the application in production is working as expected before you send a traffic and Provides you the benefit of instant rollback Does have one downside which is you're running multiple copies of the app So cost slightly more, but you know if you're running this for 20 minutes. It's usually not a huge deal so blue-green deployment the the core concept here is Stand up two versions in parallel. So In addition to the old version you stand up the new version, but you don't send it any traffic You validate it depending on where you are in your get ops and CD journey If you're really early, you might be validating it by hand There's a lot of people who are going. I can't do I can't do CD. I can't do get ops like everything's manual Well, you know what if it's manual go put together the building block Have a manual approval like it gets moving in the right direction and then automate the manual approvals So, you know Stand up the new version run some tests against it and look at it make sure everything looks good then send it traffic Then continue monitoring check your monitoring look at it and make sure it doesn't fall over and You know keep that old version ground for a while Once you shut that old version down How quickly you can roll back is limited by how long it takes your application to start You know if you're if your application is cloud native Hey, hopefully it starts in sub 30 seconds if your application some legacy thing that was built on VMs it might take four or five hours and You know that's a problem. So So so run them in parallel for a while make sure everything's healthy That's that's the core concept There are some applications that this is not suitable for it's it's not usually the cloud native ones But there are applications out there that You cannot run multiple copies of they usually have like an exclusive database lock or an exclusive file lock So if you have an application like that, you might not be able to do this But I would highly recommend making sure any CD tooling you are choosing and any get ops tooling You are choosing has a reasonable way to get here when you're ready for it because it will help you ship faster The other advanced deployment strategy I want to talk about is canary deployments. So To give you an idea of why this one matters There's there's a company. I know of who uses these who's a payment processor. So they You know, they're they're like a square They run credit card transactions if they ship broken code and their payments stop running That suddenly means literally every single payment that doesn't run is costing them money and is frustrating their customers and losing them customers like if that's your business You don't want a new version of code to go to everyone immediately So, you know, they send one percent of their transactions through a new version of code For a while I want to say it's something like two or three minutes and then they increase it to two percent go all the way up to a hundred and what that does is it Decreases the risk of shipping. So the whole reason why we're why we're at CD The whole reason we're trying to ship continuously is the smaller changes are lower risk These strategies also help you lower risk So there's various ways of implementing a canary strategy But the basic idea is incrementally increase how much traffic is reaching the new version Some people implement this at, you know, a load balancer Some people implement this by like dynamically scaling how many servers are running The application there's a lot of options When you're choosing a tool set make sure that it has a sane option You can build it yourself if you have to you can start combining four or five different tools but the more of that you're doing the The harder your final solution is going to be to maintain You know a lot of people a lot of companies build really really great in-house CD systems Then the guy who built them leaves and no one else knows how it works and then something changes and It's changed breaks a little Okay, it's fine for another few months someone changes it again breaks a little more So when you when you're looking at this stuff ask what's it going to be like when you leave How do you make sure it's going to survive you and how's your company going to grow in that time? Anyone have any any questions they want to ask about? Get ops CD, etc. Yes you in the back. Sorry. I thought I thought you raised your hand guess guess you were You know when I have a lot to reconcile right How do I make sure that the time that the first? Deployment get the change to the last one that get that change. How do I make that time? How do you make that time small? Yes? Yes, so The the best secret I have to making that time small is to automate every step Which tends to be hard and run as many steps as you can in parallel so a lot of companies have multiple different pre-production environments, so like Integration tests and security scanners are often not in the same environment I've worked for multiple companies where it's like the security scanners must run in this environment And you can't even have full control as an apt team to this like we own this you can't touch it But you know if you can run your integration tests and your security tests in parallel Hey, if either of them fail you don't go on to prod, but suddenly you're not waiting So you know if you're doing one then the other it's going to be slower When you hit production there are a lot of people who Deploy multiple regions in parallel. I have mixed feelings on this it really depends on your application The reason I have mixed feelings on this is like Making changes is not with that with zero risk and when your application is multi region there tend to be Periods of time where different regions are lower have lower usage So there's also companies who do you know maintenance windows and will you know update the the EU servers at Midnight Europe time update the the US servers at midnight US time So if you want to be all the way to production as fast as possible you do it in parallel You can decrease risk farther by going hey the production environments update on you know basically once a day during a maintenance window And since I said the first the first thing I said was fully automate everything You're not there yet get the entire end-to-end flow working even if it's got manual approvals Look at how long each manual approval step takes and then prioritize automating those steps based off how long they take Does that does that answer your question? Hi, I have a question in regards to like the approval of a commit in the get-ups way So we are the the friction I have is between like do we do approvals to go production on the PR level and Let the branch do whatever it wants to Or do we let the commit go through into the main branch and then whatever CD pipeline we use are go ever have a button Say approve go ahead. Yeah, what what what's your view on that? So my opinion is that your PR review process should be Having the code reviewers go. I believe this can go fully to production. So like When I when I review a PR If I see anything that I think would keep it from running I won't approve that PR. There may be automated tests that should always pass that haven't been run yet So, you know anything you're doing from like a code a code review level when that PR emerges You believe it's ready to go to production I'm a firm believer that you don't ask people to review your code until you believe your code will work in production If there's tests that you need to run that need a deployed environment in production. It's a lot of companies who Can use some of the get ops and CD tools to you know, stand up like a namespace in a Kubernetes cluster for a particular branch Spin it up. Hey, you can run your test suite there before it ever merges so PR that should be ready to go to production Sometimes your scanners find something you didn't expect so you may after merging to production have those things running and If they detect a problem, they'll fail it Hey, suddenly you need to go and fix that problem I've got two questions first question is Are there any implications to doing both the get push and the get pull model? I haven't seen a lot of setups that do both vast majority of the time people are doing one or the other I So my product does does the get the get push model and I've talked to multiple people about like hey We can we can push back so that you can have something else that's using it using the get the get pull model at the same time I haven't found a huge amount of interest there. There are a couple tools that are beginning to do that Where they're doing like a orchestration layer that writes back to get but it isn't widely adopted yet and I haven't seen enough of it in the wild that I think we know what its problems are yet if that makes any sense Thank you My second question would be on maintenance windows Is it industry standard to run the maintenance windows? Just off work hours or off I guess where most customers are online on the application So I'm not sure it's fair to call it an industry standard. It really depends on which industry you're in Some industries do maintenance windows some don't so like a lot of enterprise software does where your companies are other software companies Or and where you're doing a SAS solution does maintenance windows I've talked to a decent amount of like consumer tech that doesn't When you are doing maintenance windows, there's two ways people do it and I happen to have a very strong opinion of which way is the right way so the two ways I see people do it is We do it at a time that works well for our engine our internal engineering team that is in 5 p.m. on a Friday because Hey, this is a time that like fits in our schedule. We can block it off easily It's in our normal workday and then the other one that I see is this is a time when not most of our customers are not Using it so it's lower risk personally. I believe the latter is what you should do It's far away what I see most people doing But I do occasionally see people who are who try and schedule maintenance windows not around What's right for their customer but about what's right for them internally and I don't think you should do that Does that answer your question? Yeah, thank you. Yeah, no problem in the many traditional system we have a gate branch strategy such as a gate flow and How do you manage your get branch with CD? so I You might have walked in after I talked about it, but I am very adamantly against using get flow for like environments I Am of the opinion that if you are doing a single repo You should basically have feature branches. They merge to trunk and then once it's on trunk Your change the the goal of your trunk branch or your main branch depends on which repo you're on. Sorry. I'm old Is get it out to all environments When I see people doing a branch per environment That's like the single biggest thing that I see people do where half the time The tool that they're going this tool doesn't work for me It's forcing me to do these branches this way and it's bad like Half the time they're saying that about tool and the tool doesn't actually force it on them. It's how someone configured it years ago So get flow is wonderful for managing long-running versions. I would strongly advise not using it for Like a branch per environment. I would use mainline for this is staging and production Does that answer your question? Yeah, but it reminds me of another questions So generally in in our company we have dedicated the QA teams and Generally, it takes more than a week or months to Verify a certain version so the developer team should They should add a new functionality or new features while the previous version is being verified So in this case, this is where we require the branch strategy So in case of a CC CD, how do you manage such cases? so the best pattern I've seen for long-running QA and a former a former employer of mine, we had a monolithic code base that we wound up ultimately migrating to Kubernetes but To give you an idea of Just how customizable it was it had four different proprietary programming languages in it The place we found bugs was literally stand up every customer's configuration Calculate it and make sure all the numbers are the same and we had customers who took two days to calculate for a single customer So we what we wound up instituting was we had a kind of a Basically two main so we had this is the main that is currently in the process of trying to ship And then we had a main I forget what we called it that was this is the next one so everyone merged their features into that this is the next one and The ultimate main Branch was updated on a schedule from the next main branch And if you missed the day when that cut your feature didn't make the next release and you know At that point in order to ship faster It was okay How much hardware are we willing to throw at the problem to run customers in parallel through this really really slow testing process? So, you know if you have to run that slow I would say have kind of a branch before main that you merged to cut off main when you're ready to start the large The large testing process and manage it via Schedule make sure everyone knows the date. This is when it moves if you miss the state You miss the release and then you have your hardening period But I would also strongly recommend do everything you possibly can to make that hardening period shorter Thank you. Yeah, no problem Any anyone else have anything? Hi, just not question What is your recommendation in terms of the triggers for promotions of deployments when you move from dev stage uat production? Like the teams I work with they love the whole do a huge gha pipeline and automatically promote Have it pause and so on like what's your recommendation for that triggering to promote that? artifact so in an ideal situation Your SDLC should have a set of things which need to happen in each environment before the code can move on So we need these tests to pass as an example. We need these people to sign off You should be able to define kind of that list of constraints of what needs to happen in a declarative way and Once that list of constraints has happened it can move on If you think about things like maintenance windows Conceptually, it's just a constraint that says hey this environment can only update in this time of day So, you know my personal opinion is like if you haven't solved that yet go, okay What's the goal of this environment? What needs to happen before it can move on? Figure out your environment order. Hey, this environment it can't start till this environment's done And after you've defined that list of constraints You've basically defined everything you need to do to deploy and Personally, I like the constraints model where you where you're going like this needs to happen significantly more than like Scripting because it's more change resilient. So some of the some of the tools out there You can actually implement things as these things this list of things needs to happen as opposed to like you're writing a shell script And they are a lot more change resilient to my experience Any other questions? Are you seeing? In your experience. Are you seeing people when they are doing something like a canary deployment? Or or even blue-green, but just in general when something goes wrong. Do you see? People rolling forward versus rolling rolling back. I mean in a Kubernetes native environment. It's always You know the the natural thing would be or let's just point to the older version of the image or are you seeing more? Okay, let's fix the problem rebuild it and redeploy Which which one are you seeing more? I so I see both so in when the one When automated deployment tooling detects the problem You usually roll back and good if you're using any good get ops tooling any good CD tooling It should have like a one-click automated way to roll back On the roll forward. Okay cool.  We've mitigated the risk enough. It's not a problem. We're actually going and looking at the bug Let's go ahead and fix the bug. It's drop everything like we're not just abandoning that branch. We're not rolling back main It's all hands on deck. Let's fix main and then you roll forward that change So it tends to actually be a hybrid most of the time like the current environment tends to be a roll back But the the get side of it tends to be managed as a roll forward Did that answer your question? Anyone else have anything? Awesome. Well, thank you everyone for for coming if you have any questions or want to talk more later I'll be out at the armory booth. Happy to talk more